[wingide-users] how to debug selected blocks of code

Wingware Support support at wingware.com
Mon Feb 4 09:05:54 MST 2008


Jason Galyon wrote:
> Is there a way to select arbitrary blocks of code and debug only that?
> 
> I can use this functionality whether from highlighting a particular 
> section and debugging that or just selecting a start point.

The only way to do this is to use wingdbstub to initiate debugging,
rather than launching code from the IDE.  That's described here:

http://wingware.com/doc/debug/debugging-externally-launched-code

There's an API that lets you turn debug on/off, and debugging
doesn't start until you import wingdbstub.

If it's to reduce debugger overhead then just putting the 'import
wingdbstub' near where you need to start debugging is probably
enough, rather than using the API to get fancier.

I should note we discourage debugging code in a production environment,
in case that is the motivation here.

Hope that helps.

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com



More information about the wingide-users mailing list