IL级代码调试器 [英] IL level code debugger
问题描述
Visual Studio的调试器很棒,但是它允许您调试HLL代码级别或汇编语言,您无法调试IL。
似乎在某些情况下,有机会在IL级别调试。
特别是调试代码中没有源代码的问题可能会有帮助。
$ p
如果实际上没有源代码调试IL是有用的, >最好的方法是使用ILDASM来反汇编托管二进制,这将生成IL指令。然后使用ILASM重新编译IL源代码,当您启动Visual Studio调试器时,您将能够逐步了解原始IL。
- ildasm foo.exe /OUT=foo.exe.il / SOURCE
- ilasm foo.exe.il / DEBUG
我已经写了一篇有关此主题的博客文章:
如何调试编译器生成的代码。
Is there any IL level debugger in form of a VS plugin or standalone application?
Visual studio’s debugger is great, but it allows you to debug on either HLL code level or assembly language, you can’t debug IL. It seems that in some situations it would be useful to have an opportunity to debug at IL level.
In particular it might be helpful when debugging a problem in the code that you don't have the source of.
It is arguable if it is actually useful to debug IL when you don't have the source, but anyway.
The best way to do this is to use ILDASM to disassemble the managed binary, which will generate the IL instructions. Then recompile that IL source code using ILASM, when you fire up the Visual Studio debugger you will be able to step through the raw IL.
- ildasm foo.exe /OUT=foo.exe.il /SOURCE
- ilasm foo.exe.il /DEBUG
I've written a blog post about this topic at: How to debug Compiler Generated code.
这篇关于IL级代码调试器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!