mvstanton's WebLog

Introduction

Howdy! I'm Michael Stanton, and I work on the CLR dev team. Specifically I lead the Quick Response Team, and we look at some of the most godawful stress failures you can think of from various labs inside Microsoft. We also look at customer issues in conjunction with Product Support Services (PSS). What I intend to share here is my bag of tips and tricks for debugging in managed processes. Primary tools are WINDBG (or it's cousins CDB and NTSD), and SOS.DLL, our team's debugger extension with a set of nifty CLR-specific commands.

Until I can get there, here is a tidbit not everyone knows about: in V1.1 of the CLR, you can load SOS.DLL in Visual Studio. First, enable unmanaged debugging in your solution properties. Then in the Immediate Window during a debugging session, just type “.load sos” [edited April 2004 to fix a bug in my steps]. Then type “!help” and you'll see a list of commands you can call, just as if you were debugging in WINDBG.

Happy hunting!

Published Thursday, December 04, 2003 1:51 PM by mvstanton

Comments

 

Scott Glasgow said:

Appears that you can only do ".load sos.dll" when your code calls unmanaged code. If your managed code used another managed dll that calls unmanaged code, can you still load it? Tried briefly, but it said it couldn't load it still so I stopped trying to play with it since I have a project to finish.

P.S. Welcome aboard. Look forward to more tips and what-not from you.
December 4, 2003 2:13 PM
 

Wallym said:

**Think Wayne's World**
I'm not worthy, I'm not worthy, I'm not worthy.........

Wally
December 4, 2003 2:34 PM
 

Yosi Taguri said:

Welcome,
you could do that even to the sos.dll that is compatible with v1.0
December 5, 2003 7:30 AM
 

Ian Hanschen said:

I don't suppose there's any chance the immediate window could be extended to support the full range of commands that windbg supports for app debugging?
April 7, 2004 7:02 PM
 

John said:

Hi, is there an url that shows how to debug managed applications using the windbg, so far I haven't been succesfull
April 18, 2004 8:12 PM
 

avnrao said:

hi, could you some one please post any links on how to use windbg for managed applications
basically i am trying to understand the basics.

thank you.
June 9, 2004 10:47 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker