1

I am new to C# and wondering whether "windbg" or "Visual Studio Debugger" would be better tool for debugging managed code?

For the past couple of years, I have been doing development in C++ and I am comfortable in using windbg as compared to Visual Studio debugger. However, I am not sure whether windbg would work best in the case of managed code as well?

Is there any other debugging tool besides windbg and Visual Studio Debugger which works even better than these in debugging managed code?

bayCoder
  • 1,345
  • 1
  • 11
  • 19
  • I have not used windb in ages so can't compare, but the debugger in Visual Studio is quite full-featured. – Eric J. Jul 31 '11 at 17:25
  • What kind of application you going to debug? In general Visual Studio debugger performs perfect, you can attach to a process or launch application with attached debugger from the Visual Studio directly – sll Jul 31 '11 at 17:27
  • My development is not focused to some specific feature/implementation. Code may cover wide range of implementation with complexity level: Medium to high (IPC Communication, COM, Memory corruption) – bayCoder Jul 31 '11 at 17:36
  • I used windbg to find memory leaks for my WPF application... can it get any "managed" than this? :-) – WPF-it Jul 31 '11 at 17:42

1 Answers1

1

WinDbg needs SOS or PSSCOR2/4 to debug managed code, but with either of those you get a very powerful debugger. However, I would not recommend using only WinDbg for managed code as support for source debugging is rather limited at the moment (and has been for a long time). You might also want to get SOSEX as it complements SOS/PSSCOR with additional useful commands.

In my experience Visual Studio works very well for regular debugging and WinDbg+SOS/PSSCOR2 is excellent for all those hairy problems such as memory issues, deadlocks and so forth that VS doesn't handle very well.

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317