After searching the stackoverflow plus googling alot, the solutions offered for debugging code that gets emitted for DynamicMethods seems outdated and very unwieldy.
Surely in the intervening 4 years or more since LCG (light-weight code generation) was released, someone must have found a better way.
What do you find is the easiest way to verify the dynamic IL that you write and debug it?
Do you use peverify or ILDasm or something else? Those 2 tools require writing the assembly to disk but DynamicMethod doesn't offer any direct way to do that.
Apparently WinDbg aso offers a way to see the IL but that's very awkward to deal with that.
Something like a plugin to VisualStudio 2010 will be ideal.
Any ideas?
You can use ILGenerator.MarkSequencePoint to allow debugging step by step your emitted code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With