Getting Complete Stack Traces when Using Visual Studio 2005 & WinDbg/SOS

To get complete CLR stacks traces in WinDbg/SOS, you need instruct Visual Studio 2005 to not optimize the code and to create "full" debugging information.  In the project properties, Build screen:

 

1) Clear the check next to Optimize code

 

2) In the Advanced... dialog box, Debug Info, select full.

 

If either of these aren't done the optimizer will in-line some of the function calls.

Print | posted @ Wednesday, February 22, 2006 2:04 PM

Comments on this entry:

Gravatar # re: Getting Complete Stack Traces when Using Visual Studio 2005 & WinDbg/SOS
by Moshe Joshua at 3/28/2006 6:22 PM

David,

Are you an alumnus of setfocus? I am.

I need some help in accessing the managed stack. I followed everyone's (on the net) advice (including yours) on how to debug through the managed code.

Apparently (I could be wrong here) I changed a data type that compiles properly, but during runtime the stack breaks in the disassembler and hangs the computer on a "Stack Overload" even though the operation was successful.

Address = 77D48A11
Code Bytes = C2 04 00
ret 4

Is there any way to determine which object I created is the one in the stack that it is not reading properly?

Thanks. Moshe.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: