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.

6
  • 1
    A debugger is not a replacement for a brain, I agree, but neither is the contrary true. You have to think about the problem first, of course. But many times, a good debugger lets you verify your hypothesis much faster than any other method would. Commented Oct 8, 2008 at 17:24
  • @Kena: I find that to be untrue in Python. Interactive Python is so easy to use that the debugger seems superfluous. Commented May 11, 2010 at 18:57
  • 2
    Well, I'm not sure exactly where to draw the line between the debugger and the interactive console. In my book, it's all a continuum of "figuring out why this code doesn't do what it's supposed to do", whether I call a snippet directly in the console or fire up the console at a key point using pdb. I just happen to like the second option better for the kind of bugs I encounter, but whatever works for you... Commented May 11, 2010 at 20:55
  • I don't think debuggers help much, even in compiled languages. Ever tried C++? Commented Aug 9, 2012 at 20:31
  • @S.Lott I think the real point of your answer is that software systems which are designed to be testable generally don't require the use of a debugger since when something doesn't work to spec, a unit test should fail. Barring that, you turn on logging, figure out what's going on and then write a test for the bug you've found, then fix the bug. In fact, the only time I've really ever found an interactive debugger useful was when I was trying to fix graphical user interfaces, like using firebug in Firefox. Commented Feb 4, 2013 at 9:07