In a nutshell, you need to:
- Start VS with the Environment Variable COMPLUS_ZapDisable=1
- Disable the VS Hosting Process (.vshost.exe) before you start debugging
Most of the times this isn't enough, because the .NET environment uses the optimization settings for referenced assemblies, regardless of the ZapDisable settings. So the JIT optimizations has to disabled while debugging for such assemblies.