IL level code debugger

后端 未结 5 1449
醉话见心
醉话见心 2020-12-29 20:54

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 lev

5条回答
  •  [愿得一人]
    2020-12-29 21:16

    Here's the .BAT file that I use to debug IL assembler in Visual Studio. The created .IL.IL file contains the original source code lines and your generated IL assembler lines but does not show jitted machine code. I named the batch file ILDEB.BAT and is invoked as "ILDEB mypgm". I use the IL assembler directive "break" to force Visual Studio debugger to breakpoint when hit.

    for /f "tokens=1 delims=." %%1 in ("%1") do set NAME_ONLY=%%1
    @erase/q %NAME_ONLY%.il.il
    @if not exist %NAME_ONLY%.dll goto quit
    ildasm /out:%NAME_ONLY%.il.il /source /nobar %NAME_ONLY%.dll
    @if not exist %NAME_ONLY%.il.il goto quit
    ilasm /dll /debug /out=%NAME_ONLY%.dll %NAME_ONLY%.il.il
    @if not exist %NAME_ONLY%.dll goto quit
    peverify %NAME_ONLY%.dll
    :quit
    

提交回复
热议问题