[wingide-users] PYTHONSTARTUP equivalent for Debug Probe

Wing IDE Support support at wingware.com
Fri May 14 12:53:35 MDT 2010


On 5/14/10 2:40 PM, Mitchell L Model wrote:
> Is there currently a way to have Debug Probes exec a startup file the
> way the Python shell execs a PYTHONSTARTUP file? If not, could you
> suggest a way to hack one in or add it to a release someday? I have a
> bunch of utilities I like to use without having to load them explicitly.
> (Global name space -- exec, not import.)

Hmm, the debug probe simply exec's code in a stack frame of the process 
being debugged so the symbols your debug process has available are the 
symbols that the debug probe has available.  I suspect you want to load 
some convenience utilities to make using the probe easier.  One way to 
do this is to load them into the builtins when you're program is set up, 
possibly only when WINGB_ACTIVE is in os.environ.  They'd need to go 
into builtins because the local and global scopes change as you switch 
stack frames.  The downside, though, is that your changing the 
environment of the debugger so you'd need to be careful of code that 
runs differently in and out of the debugger.

Cheers,

John


More information about the wingide-users mailing list