Skip to main content

Example Python debug commands.

import pdb

##
# -----------------------------------------------------------------------
# DEBUG COMMAND SHORTCUTS
# http://pythonconquerstheuniverse.wordpress.com/category/python-debugger/
# -----------------------------------------------------------------------
#
# import pdb
#
# When the "pdb.set_trace()"" statement is encountered, start tracing with
# the (Pdb) prompt.
#
# Next statement (next)
#   "n" (press enter again to continue to next step)
#
# Quit (quit)
#   "q"
#
# Print the value of a variable (print)
#   "p variable_name"
#
# See where you are (list)
#   "l"
##

a = "aaa"
pdb.set_trace()

b = "bbb"
c = "ccc"

final = a + b + c
print final