With a few manipulation you will be able to debug it and even (most of the time) have the watch values
- Download and install dotpeek
-
In visual studio, click on tools, options
- In "debugging", unckeck the box "Enable just my code"
- In "Debugging" - "Symbols", note the value of the field "Cache symbols in the directory" for the next step
- In dotPeek:
- Drag'n drop the assembly into the "Assembly Explorer"
- Right click on the assembly and click on "generate pdb"
- In the field "Destination folder", past the value of the "Cache symbols in the directory" from the previous step and click on generate.
-
Two options to start visual studio in the correct mode:
- To start it once type the following lines into a cmd prompt:
set COMPLUS_ZapDisable=1 cd /d C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE start devenv.exe exit
- To set it permanently set this in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment Add Key: COMPLUS_ZAPDISABLE Type: REG_SZ (String) Value: 1
- To start it once type the following lines into a cmd prompt:
- You also need to disable the JIT optimization for the dll. To do that, create a .ini file with the same name as the dll on the same place (in your bin folder). Example for Sitecore.Kernel.dll, the name must be: Sitecore.Kernel.ini. Set the content of the file to:
[.NET Framework Debugging Control] GenerateTrackingInfo=1 AllowOptimize=0
Enjoy!
If it didn't work you can also try to disable the checkbox "Enable just my code" in the debugger option of visual studio
ReplyDelete