Welcome to MSDN Blogs Sign in | Join | Help

jaredpar's WebLog

Code, rants and ramblings of a programmer.

Syndication

News

Now Reading

Expert F#

What's a better book to read when learning F#?

Essential WPF

Thus far the best book I've read on WPF. Gets right down to working with WPF and the goals/history.

Purely Functional Data Structures

Reading this book makes me feel like I'm back in college. It will really get your mind going and is best read with a whiteboard handy.

Blog Roll

Eric Lippert
Dustin Campbell
Jon Skeet
Coding Horror
Brian McNamara
Hub FS
Full List

Disabling JIT optimizations while debugging

If you've ever been debugging a managed app, only to be unable to evaluate any of the locals or parameters because the code was "optimized", check out the article below.  It shows a quick trick to disable optimizations by way of a .ini file.  This is great because it doesn't force you to recompile the application and takes only seconds to implement.

The short version is create an .ini file (i.e. myapp.ini) with the following contents.

[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0

This has really saved me time debugging recently.  It's been blogged about by several others but given that I've had to search for this solution 3 times in as many weeks, I figured blogging about it would make it easier to find next time :)

http://msdn.microsoft.com/en-us/library/9dd8z24x.aspx

Published Friday, August 29, 2008 8:00 AM by Jared Parsons

Filed under: ,

Comments

# discount furniture » Disabling JIT optimizations while debugging @ Friday, August 29, 2008 8:13 AM

PingBack from http://informationsfunnywallpaper.cn/?p=2906

discount furniture » Disabling JIT optimizations while debugging

# How to disable optimizations during debugging @ Tuesday, January 27, 2009 5:51 PM

Sooner or later you may run into a situation where you need to evaluate a local variable under debugger

Kirill Osenkov

New Comments to this post are disabled
Page view tracker