vscode-python: Debugger not working properly.
Environment data
- VS Code version: 1.27.0 and 1.28.0
- Extension version (available under the Extensions sidebar): 2018.9.0
- OS and version: Debian x86-64 Linux Kernal: 4.17.0
- Python version (& distribution if applicable, e.g. Anaconda): 2.73
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: None
Actual behavior
Breakpoint pauses execution, but provides no debugger functionality
Expected behavior
I’m expecting the debugger to stop at the breakpoint and present me with the various variables and call stack.
Steps to reproduce:
- Previous VS code uninstalled, ~/.config/Code deleted, ~/.vscode deleted. Clean VS Code installed, python extension installed.
- Construct a very simple Hello.py: msg = “Hello” print(msg)
- Place breakpoint on print line.
- Start debugger.
4a. For vscode 1.27.0, the debugger toolbar comes up with Continue, Step Over, Step Into, Step Out, Restart, and Stop all enabled - breakpoint appears to be hit and Call Stack says “Paused on breakpoint”, but no variables or call stack information presented. If I click on Continue, Step Over, Step Into, Step Out then ‘Hello’ is printed and the program finishes it’s run (this is true even if I place the break point on the msg definition line).
4b. For vscode 1.28.0, the debugger toolbar comes up with Pause, Restart, and Stop enabled - breakpoint appears to be hit but none of the other buttons are enabled. Call Stack says “Paused on breakpoint”, but no variables or call stack information presented. Unable to do anything meaningful at this point other than Stop - Pause does nothing.
4c. If the breakpoint was not set then ‘Hello’ is printed out in the terminal, the process finishes, and the prompt shows.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
##########Linting Output - pylint##########
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
INFO no standard startup: not a new window
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 57 (14 by maintainers)
@JasonWorks, @Verkurkie Can you try this with
"debugStdLib": true
in launch json? @DonJayamanne I suspect this might be a an issue with where we remove debugger and std lib frames.@pranav08 This occurs because when debugStdLib=false we try to skip any frames that are not in the standard library or site-packages. The issue occurs when the venv directory is a sub-directory of the project or workspace directory.
@berkobob That looks like the project directory also has python installed in it. If you move your project out to a different directory it should work. You won’t need
"debugStdLib": True
in that case. You can set the path to a particular install of python insettings.json
.@DonJayamanne Your note about launch.json is referring to a another commentor’s note. I’m not Michael and I don’t use Anaconda3. Please reopen.