Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS code extension reports "profiling complete" for non-existent files #222

Open
rwarren opened this issue Jun 8, 2024 · 1 comment
Open

Comments

@rwarren
Copy link

rwarren commented Jun 8, 2024

Description

If you misconfigure an austin vscode task to run a file that does not exist, it seems to work (saying "Profiling complete")... but clearly does not.

Steps to Reproduce

  1. Define an austin task for a file that does not exist (per below)
  2. Run the task
  3. Check the Terminal output to see the "Profiling complete" message

Here is a sample tasks.json file that shows the behaviour:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "austin",
            "file": "does_not_exist.py",
            "args": ["--verbose"],
            "label": "Profile main.py",
        }
    ]
}

Expected behavior:

I expect the extension to provide a clear error that the file to profile does not exist.

Actual behavior:

The Austin extension reports "Profiling complete" as if nothing is wrong, per below:

Starting Profiler in /home/russ/code/possm_tools.
Running 'austin' with args '-i 100 --pipe /home/russ/venvs/austin_testing/bin/python /home/russ/code/austin_testing/does_not_exist.py --verbose'.
Profiling complete.
 *  Terminal will be reused by tasks, press any key to close it. 
 *

Reproduces how often:

100% of the time.

Additional info

On a path-related note... it would also be nice if the vscode extension docs indicates what paths will be used when austin is run as a task. For example:

1, What path is used for the "file": input in the task? Can expansions like ${workspaceFolder} be used?
2. What working directory will the process being executed by Austin get?

Versions

austin 3.6.0

@P403n1x87
Copy link
Owner

@rwarren thanks for the feedback. I'll see if I can improve this with better error reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants