Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the debugging tool in Spyder for python scripts?

I was recently introduced to Spyder. I decided to use Spyder because of its debugging capabilities. However, I have not been able to effectively use pdb in Spyder. When I started, I had the impression that the debugging tool would be similar to that of MATLAB. Is this true? How can the interpreter point to the breakpoint? I'd appreciate a proper resource on this.

like image 885
idnavid Avatar asked Jan 14 '14 00:01

idnavid


People also ask

How do I debug a Python script in Spyder?

Spyder's debugger is integrated with the Breakpoints pane, which lists the file, line, and condition (if any) of every breakpoint defined. To open it, select Debug ‣ List breakpoints, or press Ctrl - Shift - B ( Cmd - Shift - B on macOS).

How do I run a Python script in Spyder?

Execute a Script in Spyder To run a script in Spyder IDE, there are two options: use the command line option, use runfile in IPython.


1 Answers

(Spyder dev here) If you are using an Spyder version less than 2.2.5, please update it. On it you will find a Debug menu from which you can set breakpoints and control all debugging actions we have to offer.

like image 172
Carlos Cordoba Avatar answered Oct 20 '22 16:10

Carlos Cordoba