Wednesday, February 22, 2006

DILE v0.2.2

I have just uploaded a new version of DILE.

zip file: dile_v0_2_2.zip.
readme.txt: readme.txt
license.txt: license.txt
change_log.txt: change_log.txt

There are 2 new features (and bug fixes as always...):
  • debugging dynamic assemblies
  • assembly and appdomain information in the Modules Panel

I'll start with the latter one, that's more simple.
If you check the modules panel during debugging and scroll to the right in the grid then you can also see to which assembly and application domain does a module belong to, like in the following picture:



The other new feature is debugging dynamic/in-memory assemblies but this has some special rules:
1. You can load these assemblies while the debuggee is running; which I think has quite obvious reason...
2. Dynamic assemblies will be removed from the Project Explorer when debugging is finished: when you load a dynamic assembly then I ask the Unmanaged Metadata interfaces (like IMetaDataImport2) from the debugging service and then I read some necessary information directly from the debuggee process's memory. Of course, if the debuggee is not running then these are not available.

With this feature you should be able to debug assemblies that you create during run-time using Reflection.Emit or CodeDOM and also those that are generated by the framework, like ASP.NET, XSLT, Regex etc.
Reading directly from a process's memory is not so safe, and most of the code is rather based on assumptions and experience (as I haven't found any good explanation on how to do this...) but so far it seems to be stable. I haven't experienced any problem with it.
And the best about debugging dynamic modules is that everything works just like with normal modules. You can set breakpoints, check local variables/arguments, step over/in/out code and so on.

Here's a screenshot of debugging a dynamic assembly:



Please, if you find any bug or have an idea of how could DILE be improved, then don't hesitate to contact me. :-)