throws_an_exception(pressing (continuewill cause the code to resume normally with no harm done the debug function above enables you to invoke the interactive debugger easily on an arbitrary function call suppose we had written function like def (xyz= )tmp return tmp and we wished to step through its logic ordinarily using would look like ( = to instead step into fpass as the first argument to debug followed by the positional and keyword arguments to be passed to fin [ ]debug( = ( ) ( def (xyz)---- tmp return tmp ipdbi find that these two simple recipes save me lot of time on day-to-day basis lastlythe debugger can be used in conjunction with %run by running script with %run -dyou will be dropped directly into the debuggerready to set any breakpoints and start the scriptin [ ]%run - ch /ipython_bug py breakpoint at /home/wesm/book_scripts/ch /ipython_bug py: noteenter 'cat the ipdbprompt to start your script ( )(ipdbadding - with line number starts the debugger with breakpoint set alreadyin [ ]%run - - ch /ipython_bug py breakpoint at /home/wesm/book_scripts/ch /ipython_bug py: noteenter 'cat the ipdbprompt to start your script ( )(ipdbc /home/wesm/book_scripts/ch /ipython_bug py( )works_fine( def works_fine() --- ipdb ipythonan interactive computing and development environment www it-ebooks info