[wingide-users] I can't get debugging from inside of Wing to work

Wingware Support support at wingware.com
Mon Dec 19 14:11:48 MST 2011

On 12/19/11 2:57 PM, Jens Hauch wrote:
> To clarify, by special code, I mean adding this to the bottom of the module I am debugging:
> if __name__ == "__main__":
>      if len(sys.argv)>  1:
>          eval( sys.argv[1] )()
> It would be nice if there was a way I didn't have to do that. BTW, I am new to debugging so am approaching this from a very naive standpoint.

Using unit tests to test the module is probably the preferred approach 
here but another idea is to set a breakpoint on the last 'def' or 
'class' in the file, debug to it, step over, and then use the Debug 
Probe to test out the module.

Or, you can right click and Evaluate File in Python Shell and invoke 
things in the same way.

Neither of these currently will stop at breakpoints, however.  Using 
unit tests would solve that problem.


Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list