[Solved] You are debugging a Release build of .dll. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experience

The Visual Studio error “You are debugging a Release build of .dll. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experience (e.g. breakpoints will not be hit).” will be popped during executing the application in Visual Studio.

Along with the error popup will have options like “Stop Debugging“, “Disable Just My Code and Continue“, “Continue Debugging“, and “Continue Debugging (Don’t Ask Again)“.

Just My Code Warning Dialog Window Screenshot

Problem

While debugging in Visual Studio IDE, especially debugging Unit Test methods this issue “You are debugging a Release build of .dll. Using Just My Code with Release builds using compiler optimizations results in a degraded debugging experience” will popup. The Just My Code Warning dialog window will have 4 options like Stop Debugging, Disable Just My Code and Continue, Continue Debugging and Continue Debugging (Don’t Ask Again).

Solution

To solve this problem, we have to make some changes in Visual Studio settings. In Visual Studio go to Options as shown in below screenshot.

Options in Debug

In Options window, navigate to General selection from the Debugging tree as shown in screenshot.

In General, selection, check the option by the name Suppress JIT optimization on module load (Message only) as shown below image, then hit Ok. Now the problem of Just My Code Warning should be solved.

Conclusion

This above discussed looks little confusing and simple solution. The reason behind this issue may be to use Visual Studio in optimal possible way. At the same time Visual Studio provides flexibility to change the options.

Sreenivasa Rangan

Software professional with 9+ years of experience in all phases of software development with robust problem-solving skills and proven experience in creating and designing software in a test-driven environment.

Post a Comment

Previous Post Next Post