Skip to content

.NET debugging visualiser for runtime-generated IL code (via DynamicMethod, etc)

Notifications You must be signed in to change notification settings

dadhi/il-visualizer

 
 

Repository files navigation

IL Decoder (UPDATED-11-2023)

The support for the ILReaderFactory for the new .NET 6.0, .NET 8.0 and .NET 4.72 is copied and updated into the FastExpressionCompiler.

IL Visualiser

Originally developed by Haibo Luo in 2005 and posted in a series of blog posts (part one, part two).

Fork of https://github.com/drewnoakes/il-visualizer (VS 2015)

This version is updated to VS 2017 (15.5+)

Usage

When paused in the debugger, select an instance of a subclass of MethodBase (such as DynamicMethod, MethodBuilder, ConstructorBuilder, ...) and launch a visualiser:

There are two ways to use this visualiser.

IL Visualizer (Modal)

Selecting "IL Visualizer" pops up a window showing the IL code.

This window is modal and debugging may only continue once the window is closed.

Out of Process (Non-modal)

Sometimes you don't want to close the window before continuing your debugging session. For such cases, you can run IL Monitor as a separate process, then select "Send to IL Monitor":

IL Monitor is a standalone MDI application that allows displaying mutliple IL views.

Installation

(Notes apply to VS 2017, check original repo for VS 2015)

  1. Build from source

  2. Copy ILDebugging.Decoder.dll and ILDebugging.Visualizer.dll to either

    "%USERPROFILE%\Documents\Visual Studio 2017\Visualizers"

    or

    VisualStudioInstallPath\Common7\Packages\Debugger\Visualizers

  3. Restart the debugging session (you don't have to restart Visual Studio)

If you wish to use Send to IL Monitor, you run ILDebugging.Monitor.exe before attempting to use it from the debugger.

Earlier Visual Studio Versions

You can target earlier versions of Visual Studio by updating the assembly references for Microsoft.VisualStudio.DebuggerVisualizers.dll to the relevant version.

License

THE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES INTENDED OR IMPLIED. USE AT YOUR OWN RISK!

About

.NET debugging visualiser for runtime-generated IL code (via DynamicMethod, etc)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%