Closed hrshdhgd closed 2 years ago
I think this might be due to the fact that austin
is running without sudo
. On MacOS the use of sudo
is unfortunately mandatory (unless you have SIP disabled). One possible solution is to allow austin
to run without password, by adding a rule in the sudoers
file, and then actually running sudo
, e.g.
{
"type": "austin",
"label": "Profile tests",
"command": ["sudo"],
"args": [
"python",
"-m",
"pytest",
]
},
Hey @P403n1x87 , thank you so much for the suggestion. I sudo vi sudo
and added the line:
myUsername ALL=(ALL) NOPASSWD: ALL
and ran the task again after changing the task
to what you suggested above. I get a different error (exit code 1) instead of the previous exit code 127..
Running 'sudo' with args 'austin -i 100 --pipe python -m pytest'.
austin process exited with code 1
The terminal process failed to launch (exit code: 1).
Terminal will be reused by tasks, press any key to close it.
@hrshdhgd thanks for trying that. I think this is now the same as #23, which I haven't been able to figure out yet š .
I
sudo vi sudo
and added the line:
myUsername ALL=(ALL) NOPASSWD: ALL
Just as an aside, I'd use something like
myUsername ALL = (root) NOPASSWD: /usr/local/bin/austin
instead.
Not a problem , please let me know when you figure it out. In the meanwhile, would you know which Austin VSCode extension version and Austin version combination has proven to work in unison in the past?
I
sudo vi sudo
and added the line:myUsername ALL=(ALL) NOPASSWD: ALL
Just as an aside, I'd use something like
myUsername ALL = (root) NOPASSWD: /usr/local/bin/austin
instead.
Aah ... I'll try that.
same error.
Not a problem , please let me know when you figure it out. In the meanwhile, would you know which Austin VSCode extension version and Austin version combination has proven to work in unison in the past?
I'm afraid Austin latest and Austin VS Code latest have the best chances š . What I would recommend in the meantime is to invoke austin manually from the command line and open the collected samples with the extension afterwards. I think I can safely say this proves to be the most reliable way of using the extension when everything else fails.
Could you direct me to an example please?
Could you direct me to an example please?
You can run the same command that VS Code is trying to run from a terminal, e.g.
sudo austin -i 100 -o /path/to/austin/output.austin python -m pytest
and then open the /path/to/austin/output.austin
from VS Code by clicking the OPEN button in the Flame Graph panel (or using the Cmd + Shift + A shortcut). This is equivalent to running the task.
Thank you so much @P403n1x87 ! That works as expected!
This may be similar to https://github.com/P403n1x87/austin-vscode/issues/21 but I'm not sure. I read the documentation at the VS code marketplace here
Here's my situation: I have python project that I'm trying to profile using Austin within VS code. I'm using a MacBook (macOS Big Sur). Here's my
tasks.json
I'm just trying to run
pytest
over the project. I'm also running this within aconda
virtual environment. I get the following error:Any guidance/suggestion would be great appreciated.