Ever have that awkward feeling like you don’t know what actually gets executed as a result of your managed code? Visual Studio allows you to inspect the JITted code easily but does require a few tweaks first:
- First set your project to build in Release mode.
- Next go to Tools|Options|Debugging and uncheck both Suppress JIT optimization on module load (Managed only) and Enable Just My Code (Managed only)
Now you can run your project and set a breakpoint where you want to look at code and go to Debug | Windows | Disassembly to get an annotated disassembly like the following: