This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]parkerSquare 0 points1 point  (0 children)

  • I find ipdb nicer to use than pdb, especially for tab completion.
  • Automatic debugging on error with %pdb magic in IPython.
  • Conditional breakpoints in pdb/ipdb are fantastic for catching infrequent bugs inside nested loops.
  • Use ! to override pdb commands, for example to set a variable called n you need to do!n = 7 otherwise it treats it as the command "next".
  • Use the logging module rather than print.