What are the major reasons for using WinDbg vs the Visual Studio debugger?
And is it commonly used as a complete replacement for the Visual Studio debugger, or more for when the need arises.
What are the major reasons for using WinDbg vs the Visual Studio debugger?
And is it commonly used as a complete replacement for the Visual Studio debugger, or more for when the need arises.
Here are some further links to help with using WinDbg, most are .NET specific.
I always liked the watch and trace feature: 'wt' -> It prints to the output window all the function calls as they happen. That was pretty cool stuff!
You don't specify whether you're debugging native or managed code. It doesn't affect the answer, WinDbg is extremely useful for both, but many people believe that WinDbg is somehow less relevant when debugging .NET apps. Not so. As a bonus, you can learn a lot about how the .NET platform works by debugging your .NET app in WinDbg with the SOS extension. Run up (or attach to) your .NET app in WinDbg and type...
...to be sure that you load the right extension for the version of the CLR in use. Then type...
... to see what commands are available in the SOS extension.
I've heard it joked that Microsoft only has one developer tool, and it's WinDbg. Everything you could possibly want for debugging is in there, or in an extension. Sure, a subset of those things are also available in VS with a friendlier UI... :-)
I have used it when I've been sent .dmp files from an NT4.0 server - MSVC won't load these old format files.
Lightweight, can be run without installing it on a client's machine, fast, can debug kernel mode.
Mixing kernel-debugging plus remote-user-mode-debugging.
AFAIK, visual studio still cannot do remote debugging in the mode I describe as "solution". That's a darn good reason to use windbg.
Problem:
Solution:
Also, I find it easier to use the same debugger for both kernel mode and user mode, windbg is very powerful even in user mode, and I can leverage my own windbg extensions in both kernel mode and user mode instances.