Python Debugger

From CDOT Wiki
Revision as of 01:07, 3 November 2020 by Rchan (talk | contribs) (Created page with "Category:OPS435Category:rchan The Python module pdb defines an interactive source code debugger for Python programs. It supports the following features: * setting brea...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Python module pdb defines an interactive source code debugger for Python programs. It supports the following features:

  • setting breakpoints,
  • single stepping at the source code line level,
  • inspection of stack frames,
  • source code listing, and
  • evaluation of arbitrary Python code in the context of any stack frame.

You can use the pdb module to run your Python script interactive mode for debugging purpose, for example:

$ python3 -m pdb a1_template.py
>/home/rchan/ops435/a1/a1_template.py(2)<module>()
-> '''template for ops435 assignment 1 script
(Pdb)