How to stop the CLR optimizing your variables during a debug session

Finally decided to see if there was something I could do to stop the CLR optimizing away all the variables when I want to remote debug an application. This seems to have the answer, http://blogs.msdn.com/tom/archive/2008/05/09/getting-more-information-from-clrstack.aspx
Essentially, create an myfile.ini for your dll/exe and put the following in it;
[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0
 
 
Advertisements
This entry was posted in Debugging. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s