-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Debuger doesn't work anymore #10852
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
Comments
I had the same exact issue this morning. Using Python 3.7.7 on the same VS Code version. I'm running on Catalina though. I had a .bashrc alias causing the issue. Specifically: |
@tamckenna thanks for your answer. Would you mind to do a step by step on how to fix it ? I'm not sure how to reproduce what you did, thanks ! |
I commented out my entire .bashrc file and then reopened VSCode and tried debugging again, which worked. I then knew that it was something in my bashrc file. Widdled it down to the env alias. So comment out your startup scripts ie. .bashrc, .bash_profile, .zshrc, et cetera. To see if that is the issue. |
I don't have one of those hidden file in ~/ |
Another way you can verify that the user setup is the issue is by creating a new user in macOS and trying the debugger under that user. If that’s not the issue it could be your vscode install. To verify that is the issue you could use a portable instance of vscode and only install the python debugger and see if that works. https://code.visualstudio.com/docs/editor/portable |
So it works with a new user, but as i can't find the files you mentioned, how could i resolve that for my user ? thanks |
Try this in the terminal: type env if it's an alias, it will tell you what it expands into. |
Facing this problem too with 2020.3.71113 (31 March 2020) on Fedora Linux. Debugger toolbar appear for a while and then dissappear silently without error message when trying to start. env is /usr/bin/env and not an alias. Could there be some text parsing being done on env command stdout? and a slight variation of what env outputs fails this? All my team members, mostly of which are on stock Fedora installation, are reporting same issue. following is the the output of env, in case it helps
|
Can you show the terminal output when you try to launch and it fails? Does it have any |
same here, env is /usr/bin/env |
There are no output from any terminal .. the debugger toolbar simply appear for a while, and then quits. Attached is a screencast which is using "internalConsole". Similar behavior happens with "integratedTerminal" and "externalTerminal": |
@kagesenshi The .webm file appears to be corrupted, and won't play. That said, if it doesn't open the terminal at all even when you're using "integratedTerminal", then it's a different issue. My guess would be microsoft/debugpy#87, since it has symptoms very similar to what you describe. Try the workarounds described in the comments there - if it still doesn't work for you, then please file a new issue. |
@int19h didn't see the second part of your answer, there is "conda activate base" in the terminal output as you can check on the first post, what does this mean ? thx |
@tollvam Yep, I've noticed it in your screenshots - was trying to figure out if other reports are about the same issue. Can you try activating your environment manually in a terminal outside of VSCode, and then starting VSCode from that activated terminal? |
Sorry but could you just explain how to do this ? Thanks ! |
Since it's Anaconda, you should follow their instructions for activation: Once the command line prompts indicates successful activation, you should be able to launch VSCode from it by running |
Well apparently by default when i launch a terminal outside VSC i'm already in a environnement, so i deactivated it and activated it but code doesn't work as you can see below : `Last login: Thu Apr 23 12:48:08 on ttys000 leMacbookPro:~ thomas$ conda activate base |
Nothing changed with the VSC update to 1.45 |
Sorry, I missed your earlier reply! If de/re-activating an environment in a terminal outside of VSCode means that You can try to work around the error that you're seeing in the terminal by using a full path to the |
I've managed to make "code" works via https://stackoverflow.com/questions/29955500/code-not-working-in-command-line-for-visual-studio-code-on-osx-mac |
Does
|
Yes it does
|
But it fails with the same error message if you manually use it in the terminal inside VSCode? |
Not it works also, it fails when i launch the debugger with the error message i put in the first post |
When you start debugging, is it still trying to do |
yes twice as you can see below, it's the same error code than in the print screen
|
Alright, I think this is basically just another manifestation of #4203. Can you try the workaround suggested there? "python.terminal.activateEnvironment": false, (since you're already activating it yourself, having VSCode try to activate it is redundant even if it did work correctly) |
Ok so it removes a part of the error but i have stil
and as mentioned in the first post, all the folder / files exist |
I'm at a loss at this point. The extension itself simply submits a command line that starts with I also don't understand how it can fail in this case, but work when you manually use |
I've recorded a video here, replicating the bug : |
Note that it creates a new terminal to run the debugger command line in. This is the one that I'd like to find out more about. If you try to use |
Oh ok, env doesn't work and $PATH doesn't return anything |
I think this might have something to do with microsoft/vscode#70248. Can you try the workarounds suggested there - |
The second one was already there, and putting the first one on false didn't help. |
I did
in the Python Debug Console and now it works ! |
Thank you for confirming the root cause! I just realized that I made a mistake in my earlier suggestion - I meant to suggest trying But this might cause other problems as described in the linked issue, so setting |
It was already on 'true' for me but maybe i changed it in the past. |
I encountered the exact same issue and for a while I had to set However, now I found that the problem is in fact caused by the Since you, @tollvam, mentioned that you also had this line in your settings, I can imagine that this is the solution to your problem as well. |
Environment data
Expected behaviour
Actual behaviour
But files not found are here (the third one is the one from where i launch the debugger)
Steps to reproduce:
The text was updated successfully, but these errors were encountered: