Hello. I am wondering how I can make Spyder stop on a breakpoint inside a function during an interactive session.
Say, I have a function testfun: def testfun(): print 'line1' print 'line2' #breakpoint print 'line3' Then I set a breakpoint on line 2 (by pressing F12 on this line). I would like to be able to run this function from the IPython console and make it stop on the breakpoint. I found out that if I write: > pdb Automatic pdb calling has been turned ON followed by an illegal statement such as 'spam', the debugger will be opened, and I can write "debug testfun()" to do that I want: spam ------------------------------------------------------------ Traceback (most recent call last): File "<ipython console>", line 1, in <module> NameError: name 'spam' is not defined > <ipython console>(1)<module>() ipdb> debug testfun() But is there any easier or "more elegant" way of doing this? Cheers, Øystein -- You received this message because you are subscribed to the Google Groups "spyder" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
