Debugging in Spyder is supported thanks to the following Python modules:
- pdb: the Python debugger, which is included in Python standard library.
- winpdb: a graphical frontend to pdb, which is an external package
(in the Editor, press F7 to run winpdb on the currently edited
Debugging with pdb
The Python debugger is partly integrated in Spyder:
- Breakpoints may be defined in the Editor.
- Simple breakpoints can be set from the Run menu, by keyboard shortcut
(F12 by default), or by double-click to the left of line numbers
in the Editor.
- Conditional breakpoints can also be set from the Run menu, by
keyboard shortcut (Shift+F12 by default), or by Shift+double-click
to the left of line numbers in the Editor.
- The current frame (debugging step) is highlighted in the Editor.
- At each breakpoint, globals may be accessed through
the Variable Explorer.
For a simple, yet quite complete introduction to pdb, you may read this: