Ask Your Question

breakpoint not working in 8.1.1

asked 2021-11-17 08:21:43 -0500

Kenny Ostrom's avatar

updated 2021-11-17 08:34:15 -0500

I have been using Wing Pro (rev b886eed357c8)
I upgraded to 8.1.1, and I am no longer hiting breakpoints in my django server.
I tried deleting and creating a new project file, but that didn't help.
I then loaded it in 7 and (after recreating my wcu settings) it worked and hit breakpoint in the older version.

Do you have any suggestions for a setting I may have messed up?

edit retag flag offensive close merge delete


Is the same Python being used in both cases? Recent Pythons have changed in behavior, as far as which lines of code are actually reached so that could explain it. If that's not it, could you show an example of the code and where the breakpoint is located? Also, try adding 'assert 0' there to see if Wing stops there. Wing should always stop on an assert but may fail to show the Python code file if there is some confusion about filenames. Also please let us know if this is remote development or local and whether you are using wingdbstub or not.

Wingware Support's avatar Wingware Support  ( 2021-11-17 08:34:02 -0500 )edit

python is 3.8.5 windows x64 (same source folder, same venv) all local
I just hit factory reset on wing 8.1.1 options, no change.
I've never heard of wingdbstub, sorry.

I've verified that it is executing that code with print statements, but I'll try assert ...
I see the "AssertionError" printed in the console (i.e. the Debug I/O tab of wing) but it did not break on the assertion, either.

Kenny Ostrom's avatar Kenny Ostrom  ( 2021-11-17 08:53:23 -0500 )edit

Putting a breakpoint on a single-line print() should be a safe way to check whether breakpoints are entirely not working for some reason. The relevant changes in Python are mostly in multi-line statements. But yes please also try the assert since it'll help narrow down the problem.

Wingware Support's avatar Wingware Support  ( 2021-11-17 08:55:36 -0500 )edit

Is this code possibly run in a sub-process? If so, is the Debug Child Processes option enabled under the Debug/Execute tab in Project Properties? When in doubt, compare os.getpid() (after 'import os') between the first line of your code and the code where breakpoints are not working.

Wingware Support's avatar Wingware Support  ( 2021-11-17 08:58:15 -0500 )edit

Thank you. It looks like it's hitting breakpoints now with project properties, debug/execute, debug child processes, "always debug child processes"

Kenny Ostrom's avatar Kenny Ostrom  ( 2021-11-17 09:11:51 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-11-17 09:15:16 -0500

For the record for others that might run into this: The solution in this case was enabling the Debug Child Processes option under the Debug/Execute tab in Project Properties because the code was being run in a sub-process. See also above comments for things to try if you run into this problem.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-11-17 08:21:43 -0500

Seen: 1,995 times

Last updated: Nov 17 '21