[wingide-users] Breakpoints at pass?

Wingware Support support at wingware.com
Mon Mar 15 12:06:56 MDT 2010

Tom Stambaugh wrote:
> In the following fragment of code, a breakpoint set at the "pass" is 
> often skipped:
>     answer = self.someReturnValue()
>     # do stuff here
>     if aVariable is None:
>         someVariable = self.doSomething()
>     else:
>         pass
>     return answer
> A breakpoint set at the "if" statement works as expected, as does a 
> breakpoint set at the "return" statement. I'd like to break at the
> "pass" statement so that I can inspect local state before I write code
> that will go there.
> Am I misunderstanding what "pass" does, or is this a bug?

"pass" generates no byte codes so the line is never executed and thus 
the debugger can't stop there.
If I remember correctly, this may vary by Python version.


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list