July 2011 - Posts

New debugging feature - debug 3rd party code

One of the greatest features in ILSpy is the ability to debug third party code (like .NET framework code) without the need of debug symbols.

Last week, I was working on making this possible in SharpDevelop IDE also. For this, a great deal of help comes from the decompiler (ICSharpCode.Decompiler) that provides the code mappings for the current decompiled type/member. But in order to make evaluation work (for all cases, even for optimized code), some debugging options must be set:

  • Just My Code - disabled (from debugging options)
  • step over code without symbols - disabled (from debugging options)
  • Ngen - disable optimization
  • JIT - disable optimization
So, in order to make the debugging and evaluation of third party code possible, one should disable JMC and StepOverCodeWithoutSymbols options from the debugging options settings (Tools->Options->Debugging). 
Here, you can see a demo of this new feature that I like to call "debugging the undebugable". :)
Also, debugging features from SD IDE are available: breakpoints, evaluation, call stack pad, local vars pad, watch pad, etc.
Some pictures...
Have fun debugging .NET code! :)
Posted by Eusebiu | with no comments
Filed under: , , , ,