|
From: Fernando P. <fpe...@gm...> - 2007-11-25 00:25:27
|
On Nov 24, 2007 4:17 PM, Rich Shepard <rsh...@ap...> wrote: > On Sun, 25 Nov 2007, Angus McMorland wrote: > > I've found it easiest to solve these sorts of bugs by running the code in > > an ipython shell, with automatic pdb calling. That way you can inspect the > > values of the parameters in question - one of which is, I think, the > > problem here. > > I've not run ipython with pdb; I'll look at the docs to learn how. I do > use winpdb on the application. If you type %pdb *before* running your scripts, then any exception that fires will automatically activate pdb. But for a while we've had a more convenient way to access pdb, which is the new %debug command. At any time if you simply type %debug, the pdb debugger will activate into the last unhandled exception. So as long as you don't wait too long after seeing an exception (since the system only works with the *last* one, if you get a new exception from a typo at the command line you lose the chance to inspect your program), you can use it in a more fluid way than letting %pdb forcefully activate every single time. Cheers, f |