How to view JITted code in Visual Studio


We spend a lot of time in these posts looking at the CIL that is generated by the C# compiler. But did you know that you can actually go a level deeper and view the assembly code generated by the JITter?

1. Run your program into a breakpoint

Run your program into a breakpoint

2. Go to DEBUG ➙ WINDOWS ➙ DISASSEMBLY

Go to DEBUG ➙ WINDOWS ➙ DISASSEMBLY

3. View your disassembled code

View your disassembled code

Easy!