pdb – The Python Debugger

Debugging with pdb

Very first thing, read this blog by Steve Ferg’s which explains pdb in details.

Here are the summary of the necessary commands:

import pdb
setting up break points by pdb.set_trace()

in-debug keys:

- n (next)
- ENTER (repeat previous)
- q (quit)
- p <variable> (print value)
- c (continue) 
- l (list where you are)
- s (step into subroutine)
- r (continue till the end of the subroutine)
- ! <python command>
Advertisements

মন্তব্য করুন

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / পরিবর্তন )

Twitter picture

You are commenting using your Twitter account. Log Out / পরিবর্তন )

Facebook photo

You are commenting using your Facebook account. Log Out / পরিবর্তন )

Google+ photo

You are commenting using your Google+ account. Log Out / পরিবর্তন )

Connecting to %s

%d bloggers like this: