Search code examples
.netdebuggingclrcil

Debugging in .NET in Release mode


Some time ago I've read an article on CLR, where author showed that if a project is compiled in DEBUG mode, before each operator comes a NOP command, thus allowing to debug a code. Nevertheless, today I discovered that we can also debug in release mode as well... Please help to understand the difference.


Solution

  • You can debug in Release mode to an extent. Debug and Release are simply build configurations (of which you can create many), the real difference is that Debug configuration doesn't optimize the generated binary code (optimized code complicates debugging). It also generates additional debug data which release does not.