-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Breakpoints not hit. #12593
Comments
How are you running the file? To hit breakpoints, you need to do Run -> Start Debugging (F5). If you're using "Run Python File in Terminal" on the editor toolbar, that does not run it in debug mode. |
Hello, I am running Run->Start Debugging If I changed the python used to a different one (ActiveState 3.6.6), it works. |
For Anaconda, try starting VSCode from a terminal in which the conda environment has already been activated manually - does that help? |
Yes!!
Thank you |
Additional observations: As I am working and debugging with the anaconda-python, the breakpoint stops working again. I am still trying to debug using Run->Start Debugging as before. |
@int19h @sachinmyneni |
@ChrisLee63 @sachinmyneni |
This is a general problem with Conda activation. We haven't been able to find a solution that works reliably so far, so for now, you have to use the workaround with manual activation. If you watch the terminal closely, you'll see that it happens when the debugger command line ( |
One thing I forgot to mention - once you start VSCode from an already-activated terminal, you should also disable auto-activation for terminals in VSCode - this is "python.terminal.activateEnvironment". Manual activation before starting VSCode + disabling auto-activate should provide a consistent workaround - please let me know if it still breaks for you. |
@int19h
Conda activation only happens when creating a new terminal, but you can see the breakpoints still will not be hit when I use an existing activated terminal (env torch1.2_py2 has been activated). |
BTW, I find switching debug configuration is a workaround.
@int19h Maybe the issue should be open again? |
@int19h Just wanted to inform you that the workaround is not working. |
It sounds like there's a different issue here that might manifest with similar symptoms, but has a different root cause. The fact that switching configs makes some difference might be indicative of it being a bug in VSCode itself, in fact, so we might have to route it accordingly. So it would be best to file that as a separate issue. |
@int19h I have found some similar behavior. I am using conda environment. I tried manual activation, or automatic, and beside of this created a new config, none of them worked. |
Can this be opened again? The workaround of not activating the python environment in the shell is not working and it is important for me to be able to debug the specific versions in my virtualenv |
Issue Type: Bug
I have a simple file parser in python and input text file. When I place a breakpoint at any line in the soure, the break point is not being hit.
I set the break point at line pointed to here. Or at any line for that matter...
I expect the debugger to stop and allow me to inspect the variables.
I initially created a Microsoft bug for vscode and I was asked to submit this to vscode-python:
microsoft/vscode#101075
VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 10.0.18363
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Extensions (14)
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: