Anyone else see this? I went around and around now to figure out why it would not stop at a given breakpoint even though it was obvious that the script would reach it. Then after playing around with it some, it started working again. It was on a pass statement just after a valid if statement that was true…
@Helvetosaur Debugger does not stop on pass statements. I logged it here to take a look and see if I can improve this:
RH-81361 Python debugger does not stop on pass statements
The real reason is pass statements are basically skipped by the runtime as they do not have any effect whatsoever. Every python 3 debugger that I know skips over these statements. The confusion here is that ScriptEditor will keep the breakpoint read icon on the line when you start debugging a script, whereas more complicated debuggers that use a debugging server, communicate the breakpoints with the server and update the script with only ‘valid’ breakpoints. Notice in the video below how after starting the debug, vscode removes the breakpoint on pass statement as the debug server knows it will not stop on that line: