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

After breakpoint pause, STOP button restarts execution instead of stopping. #21561

Closed
thealphamoose opened this issue Jul 5, 2023 · 7 comments
Assignees
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@thealphamoose
Copy link

Type: Bug

Debug does not stop executing when I tried to stop debugging after hitting a breakpoint. I found this problem reported Aug 18,2020 and the solution from Microsoft was to install the most recent release. But I have the most recent 1.79.2. Visual Studio Code
My app is written in python/Django. It used to work three months ago but since I have returned to the app for some changes my VSC must have updated to 1.79.2 and now this issue has appeared.

Details: When I set a breakpoint and it is tripped, the code execution stops normally. I can step, I can continue, all is good. But when I STOP (the red button on the ribbon) the program continues executing. If I hit stop a second time the program does stop but a great deal of code has been executed between the first and second clicks.

Extension version: 2023.10.1
VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:59:55.818Z)
OS version: Linux x64 5.15.0-76-generic snap
Modes:

System Info
Item Value
CPUs AMD Ryzen 5 3600 6-Core Processor (12 x 3464)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
Load (avg) 1, 1, 0
Memory (System) 62.73GB (55.12GB free)
Process Argv --no-sandbox --force-user-env --unity-launch --crash-reporter-id e7718076-72e9-4f77-8582-28e46196ba60
Screen Reader no
VM 0%
DESKTOP_SESSION undefined
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30776702
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30610679
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30766890
pythongtdpath:30769146
bgfeh915:30780428
pythonnosm12tcf:30779713
pythonidxptcf:30772540
pythonnoceb:30776495
cmakestatusbarv2:30779594

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 5, 2023
@paulacamargo25
Copy link

Hi @thealphamoose thanks for your issue report, could you sent me your launch.json config and could you also send me the Python output log to see if there are any errors.

Thanks

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 28, 2023
@thealphamoose
Copy link
Author

thealphamoose commented Jul 31, 2023 via email

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jul 31, 2023
@thealphamoose
Copy link
Author

thealphamoose commented Aug 6, 2023 via email

@thealphamoose
Copy link
Author

Hi Paula,

I have been trying to solve the problem without success.

I tried to isolate the problem by starting a new project and testing the breakpoint step by step.

I created a new folder, then using visual studio code, I create a virtual env. (.venv) for Python using 3.11.
Then I tested debuggger using a small python program- no issues.
Then I added mysqlcleint, installed django 4.2.5 - ran a test-- no problems with debug/breakpoint.

I then copied over my settings.py, url.py and commented out all my apps I had previous written. Then I uncommented my "home" page app. So I had a simple template to display, like a hello page.

This is where it got intesting. If I placed a breakpoint early in the program execution, like in the setting.py file. The breakpoint and the stop button worked correctly. Then I ran runserver and started my app which generated and displayed my home page. The home page come up-- no execution errors. I then placed a breakpoint in the views.py code which generates and displays the home page and the breakpoint DID NOT WORK CORRECTLY. Program execution stopped correctly but when I hit the STOP button execution restarted. I had to hit the STOP button again to terminate execution.

The problem seems to be either django or runserver related. I'll keep at it and update you. If you have any clues I'm all ears.

Thanks
Alphamoose

@2af
Copy link

2af commented Jan 2, 2024

Experiencing the same problem in Visual Studio Code - Insiders
If you are in debugging mode and hit a breakpoint,
then BOTH [CONTINUE] and [STOP] buttons act the same - they continue to execute code to the end.
While the expected behavior for [STOP] Button IS TO STOP FURTHER EXECUTION.

Django, launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": [
"runserver"
],
"django": true,
"justMyCode": true,
"envFile": "${workspaceFolder}/.env"
}
]
}

@thealphamoose
Copy link
Author

thealphamoose commented Jan 2, 2024 via email

@paulacamargo25
Copy link

Hi, sorry for the delay, i was looking into this issue, could you try using the new Python Debugger Extension in insiders?
if the error persist could you create an issue in the Python Debugger Repo. Thanks

@paulacamargo25 paulacamargo25 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 22, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants