Skip to content

Welcome to our weekly research support coffee hour on Zoom! Click here for more information.

Warning!

Puhti scratch disk is becoming very full (80+ % ) resulting in performance degradation. Everybody is advised to only keep actively processed data on scratch, all other data should be deleted, transferred to host institute or stored in Lumi-O. No new quota will be granted. Click here for a tool for examining your disk usage.

pdb: Python debugger

Available

  • Mahti: Any Python version
  • Puhti: Any Python version

License

Usage is possible for both academic and commercial purposes.

Usage

pdb is an in-built Python debugger that supports breakpoints, stepping through the source line by line, inspection of stack frames, source code listing, etc.

There are two ways to use the debugger. Within the code (or from the interpreter):

import pdb
pdb.run('functbd(list_parameters)')

Alternatively pdb can also be invoked as a script to profile another script:

python -m pdb myscript.py

Running pdb will open the prompt which supports various commands such as where, down, up, up, break, step, next, jump, list.