[wingide-users] querying debug?

Wingware Support support at wingware.com
Sat Feb 21 09:54:40 MST 2009


Hamish McKenzie wrote:
>
> is there any way I can determine whether I’m running a script under 
> debug in wing?
>
> what I want to do is turn on an exception handler if I’m not running 
> under debug in wing, but if I am, I don’t want exceptions handled. 
> it’s a pain having to remember to comment the excepthook assignment 
> when debugging as I usually forget to uncomment it when checking in...
>

You can check it like this:

import os
if os.environ.has_key('WINGDB_ACTIVE'):
print "debugging"

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com




More information about the wingide-users mailing list