[wingide-users] Could the debugger import designated modules into every module?

Wingware Support support at wingware.com
Sat Mar 23 13:28:07 EDT 2013

Luc Bourhis wrote:
> I have a set of tools that I use only for debugging, either in the debug probe or in conditional breakpoints. While debugging I add an import line but it is all too easy to forget to remove it when it becomes production code. It would be really nice if the debugger could be told to do that auto-magically. It would be as neat as the scraping helper snippets that helps source code analysis.

I'm a bit afraid of magical features like this since they can be very 
confusing if you forget about them.  For extension module scraping it 
was necessary magic.  For this case, using something like this seems better:

import os
if 'WINGDB_ACTIVE' in os.environ:
   import something

Also possible here would be to add a way to more easily execute code 
snippets in the debug probe, perhaps choosing them from a menu.

I was going to suggest using the scripting API as a way to define 
commands that execute certain things in the Debug Probe but see we would 
need to expand our API to support that.  If you think that would be 
useful, please let me know.

In any case I'd be interested in hearing your thoughts on the above.



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list