开发者

How do I debug a .NET executable at MSIL-level?

I have a .NET executable file that I need to debug. I would like to step into it so that it stops on the first instruction and have a visual interface for single-stepping, breakpoints, etc.

This seems like it should be easier but I haven't yet found a solution! I read about DbgCLR.exe on the web but I can't find that file on my system or online for the life of me. I also read somewhere that DbgCLR.exe is no longer necessary because Visual Studio can do the same thing. A开发者_运维知识库 Visual Studio .NET solution would be great, too! (Maybe there's a menu item that I overlooked?)

Either will suit, so long as I can inspect the stack, set breakpoints, etc.


If you're one to buy utilities - Red Gate's new .NET Reflector Pro does exactly that situation really well ($195). I think you can get an evaluation version that last for a little while on Red Gate's site

I've use DILE in the past to do that in IL, for some reason I've had mixed experiences with Deblector.

Probably not worth your time but you can also create pdb symbols for an exe but if the assembly has alot of references it gets complicated. I put a blog post together a few years ago on how to do it: Disassembling .NET - Appendix A


WinDbg can be used as it automatically stops when the process initiated. However, it only displays native things unless you utilize SOS.dll and managed debugging skills. So it has a sharp learning curve.


Deblector allows you to single step IL via reflector.


You can convert the executable to csharp (vb.net).
There is good and free tool, .Ned Reflector.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜