开发者

Improvements in debuggers?

Have there been any improvements in debuggers in the past 20 years 开发者_JAVA技巧or so? When I start up pdb I feel like nothing has changed. Am I missing something huge?

What innovations, specifically, have been added to debuggers in recent years?


Visual Studio's debugger visualisations are such a massive productivity boon, especially when working with C# or the C++ STL. It also has previewers for block text, html, xml and even DataSets. The STL support shows vectors, maps, sets and lists.

In VS2010 there's also much improved support for multithreading with parallel callstacks.

When I have to debug on Xcode or with gdb I feel like I'm dragged back into the dark ages (Xcode won't even show local variables reliably half the time, and getting unicode strings to display is a nightmare)


I think "debuggers" have stayed the same for a quite a while. Most just give you information about callstack, threads, locals, globals and maybe some expression evaluation. That feature set is pretty well defined and it works so it hasn't change much. It probably doesn't need to.

A debugger helps you figure out your program flow where as many other diagnostic tools have decided to focus on very specific issues. Instead of limiting ourselves to the traditional debugger lets look at the whole space of diagnostic tools since they also help us debug our problems.

  • http://en.wikipedia.org/wiki/Valgrind - If you suspect some issue related to memory then you probably wouldn't start stepping through code with a debugger.
  • http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html - If you have a regression in your code stepping through a debugger won't be as helpful until you know what code caused the regression. Tools that help you narrow down on the code quickly save a lot of time and arguably quicker than the traditional debugger.
  • http://logging.apache.org/log4j/1.2/ - Tracing might be old school but people build out all sorts of analysis tools for their logs. By doing the analysis you can uncover bugs that are not obvious. For example stepping through code with a regular debugger wouldn't indicate that 90% of your users don't find the "checkout" button on their shopping cart. But basic data analysis can help find all sorts of bugs that other debuggers wouldn't find.

There are certainly main more tools that help with debugging very specific issues: profilers, network traffic analyzers (WireShark, HTTPFox), many SysInternals tools, and even /proc.


There are lots - just like in every other field of software development. A good example is the reverse-* set of gdb commands, which were added to gdb as recently as 2009.


Visual Studio has added IntelliTrace

This allows you to rewind your app and see the value of variables historically, not just the current state of your app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜