Python debug

Python Debugger:

Recently i came to know that The most important things to be a Great programmer,not only to know the programming..knowing the debugging is makes this as a great programmer from quora and swaroop

So,Certainly I was searching about debugging in python.

>>>import pdb

python debugger package to debug your python gold code.


This line you need to add where you want to start debugging.

Absolutely we can debug

>>>“string function object”)//function object as a string

There are pretty lot of options and commands are there to do debugging.

The debugging shell looks like

> /work/t/
-> return
(Pdb) args
n = 3
output = to print

The command options in the debugging shell:


list the lines where the current call stack is processing


Next line to be debugged


These are the commands which does the operation according to it’s meaning.

p var

print var(var means variable)

p var1,var2,var2

pp var

pprint variables by comma seperator


current call stack

If you want assign a value for a variable in the debugging shell

You have to use the (!) exclamatory mark

!var = value

These won’t throw exception related to object

These are the basic skills i touched today

If you need elaborately go ahead with these


About Navaneethan

mixed feelings...
This entry was posted in General. Bookmark the permalink.

Leave a Reply

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

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s