|
From: Pierre R. <co...@py...> - 2010-02-07 08:58:39
|
Pierre Raybaut a écrit : > 2010/2/6 Gael Varoquaux <gae...@no...>: > >> On Sat, Feb 06, 2010 at 11:27:50AM +0100, Pierre Raybaut wrote: >> When you start having a somewhat complex set of functions that call >> each other, or when you are getting failures with somebody else's code, >> this is priceless. This is so useful that to debug some code that, when I >> am trying to understand why some code is not working the way it should >> be, I will purposely add an exception, to be able to introspect the code. >> Granted, adding pdb.set_trace() will work without IPython[*], but I find >> it very useful. >> >> [*] It will not work in Spyder as it is quite challenging to have these >> features requiring user terminal interaction in a GUI. >> > > Actually it works in Spyder too (in the external console which is > executed in a another process). > ;-) > > -Pierre > Two screenshots to prove it :-) Running an example script including "pdb.set_trace()" in the external console: http://spyderlib.googlegroups.com/web/pdb_test.png Executing the same script from a Python interpreter within the external console: http://spyderlib.googlegroups.com/web/pdb_test2.png -Pierre |