Thanks for all the responses, Steve and Ryan, much appreciated.
Between them all (including an email from Steve), we have a good set.
I have just been experimenting with:
1. Typing pdb to toggle on the automatic breaking into the debugger.
2. Using the Up and Down commands to move up and down the context
between calling functions.
I tried a simple test:
def fred():
aa = 1
fred1()
return
def fred1():
bb = 1
fred2()
return
def fred2():
cc = 1
print 1/0
return
fred()
The program broke at 1/0, and then went into pdb as required. Using
the Up and Down commands it successfully moved context between fred2,
fred1 and fred (and back down again). I was able to verify this by
looking at values of cc, bb and aa. This is great - thanks all for
some really good tips.
Laurence
On Feb 4, 10:42 am, Ryan Clary <
mrcl...@gmail.com> wrote:
> I'd add that if you use the ipython console you can turn on automatic pdb calling. Typing pdb at the prompt will toggle automatic pdb calling. With this feature turned on, you can execute code normally (f5) and pdb is called automatically if an exception occurs, placing the prompt at the location of the exception.
>
> Ryan Clary
>
> On Feb 3, 2012, at 3:28 PM, Steve wrote:
>
>
>
> > If you execute your code in the debugger (Ctrl+F5) you will be sitting
> > in the debugger in the console window after the exception occurs. At
> > this point you can use the pdb interface inspect variables and such.
>
> > You can learn more about the python debugger by doing some reading
> > here:
http://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-i...
> > For more options, visit this group athttp://
groups.google.com/group/spyderlib?hl=en.- Hide quoted text -
>
> - Show quoted text -