Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • You can drop into the python debugger by using import pdb; pdb.set_trace(), and then step through code interactively. That may help you trace program flow. Commented Jun 11, 2012 at 1:17
  • Great idea! Thanks Matt. It would still be helpful to get a log as mentioned in the question so that I don't have to debug every time. Also, do you know of an IDE for python which is as good as Eclipse for Java (ctrl+click takes you to function definition) that I can make use of to make debugging easier ? Commented Jun 11, 2012 at 3:03
  • 1
    What is the question here? Commented Oct 15, 2022 at 5:59
  • 2
    Anyone visiting this question in 2022 and beyond... dont use pdb. Its a fine library if the only IDE you have is vim, but if you have a modern IDE such as VSCode or Pycharm, the debugging suites there are more than capable of providing this information without littering your code with unnecessary lines that could potentially be a source of problems if left in. Commented Nov 2, 2022 at 16:04