1

I have a DLL (the Sitecore Kernel) that I decompile using DotPeek. I am setting the Environment Variable COMPLUS_ZapDisable to 1 before launching Visual Studio, and added the following .ini file:

[.NET Framework Debugging Control] 
GenerateTrackingInfo=1 
AllowOptimize=0

for each of the .pdb files.

NOTE: all of the generated .pdb and .ini are in the /bin folder of my application.

Sometimes it works, and I can step-in all methods and add watches; most of the time, however, it doesn't and the amount of methods I can step in or add breakpoints to seems arbitrarily limited.

Anyone has any suggestion?

Emanuele Ciriachi
  • 2,216
  • 2
  • 26
  • 39
  • 1
    That .ini file was needed back in the .NET 1.x days, it has no useful purpose anymore today. Presumably the Ngen native image is the hangup. Use ngen.exe uninstall to delete the existing image, by itself good enough to now give you debuggable code. Fwiw, ngen.exe install /Debug is the equivalent of AllowOptimize=0. – Hans Passant Apr 21 '17 at 10:02
  • I will give it a shot today, thank you for your help. – Emanuele Ciriachi Apr 21 '17 at 10:03
  • @Emanuele Ciriachi, What about this issue? Could you get useful information from Hans Passant's suggestion? – Jack Zhai Apr 25 '17 at 11:27
  • I didn't had a chance to go back on the problem yet - I will try soon enough hopefully. – Emanuele Ciriachi Apr 25 '17 at 11:30

0 Answers0