[wingide-users] How to find whether WING IDE is attached to the debugger
support at wingware.com
Sun Jul 20 09:15:12 EDT 2014
Dietmar Schwertberger via wingide-users wrote:
> Some of my scripts should import wingdbstub, such that I can later
> attach the debugger to them.
> In this case os.environ.get("WINGDB_ACTIVE") is always '1'.
> Is there a way to find whether WING IDE is really attached to the
> I would like the exception handling to be different in this case
> (re-raise exceptions).
I think wingdbstub.debugger.ChannelClosed() will probably work for you,
although you could first try to just call wingdbstub.Ensure() to
start/reconnect the debugger if that is preferable.
Similarly wingdbstub.debugger.DebugActive() checks if the debugger is
enabled (it can be w/o being attached to the IDE).
Wingware | Python IDE
Advancing Software Development
More information about the wingide-users