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)“.
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).
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.
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.
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.