Did you know that you can control JIT code generation using code? Well you can.
You can use the .NET . The controls how the runtime treats code within the module. The runtime might track extra information about generated code, and it might disable certain optimizations based on the values contained within this attribute.
How to use:
On your AssembllyInfo.cs file you can add the code: [assembly: System.Diagnostics.Debuggable(false, false)]
First boolean (IsJITTrackingEnabled) – Gets a value that indicates whether the runtime will track information during code generation for the debugger.
Second boolean (IsJITOptimizerDisabled) – Gets a value that indicates whether the runtime optimizer is disabled.