A plugin for LINQPad which displays compiler generated code.
Switch branches/tags
Clone or download
Pull request Compare This branch is 1 commit ahead of vincpa:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LinqPadSpy.Plugin
LinqPadSpy.Standalone
ilspy @ 03664c9
.gitmodules
LICENSE
LINQPadSpy.JPG
README.md

README.md

Mod for LINQPad 5

LINQPadSpy does not work on latest LINQPad(LINQPad 5). In releases page, I put modified binary it works on LINQPad 5.

neuecc/linqpadspy/releases

LINQPadSpy

LINQPadSpy shows decompiled sources from queries which have been compiled by LINQPad allowing one to see any additional compiler generated code. Download the latest release.

LINQPadSpy Screenshot

Goals

Gain a deeper understanding of the C# language and compiler with LINQPad.

Getting started and contributing

Currently the implementation is a bit of a hack. I've made some small changes to a fork of ILSpy and am re-using the UI text view control and all of ILSpy's built in functionality. I expect the quality of code to improve should there be more interest or I have more spare time available.

I have a bunch of features I'd like to implement and they're all listed on the project issue listing page, just filter by enhancement. If you'd like to contribute take a look at the issue listing and leave a comment so I know you're working on it.

Current feature set

  • Decompiles source code when the query contains a this.DumpDasm() (C#) or Me.DumpDasm() (VB.NET) in the execution path. You can also decompile an F# compiled assembly but the decompiled source will be in C#.
  • Ability to change the decompiled source language from C# to VB.NET or IL without rerunning your query.
  • Display assembly and class heirarchy browser.

Getting the plugin to work

Unless you plan on making changes and compiling the source, your better off downloading the precompiled binaries. Download the latest release here.

  1. Clone the repository git clone --recursive https://github.com/vincpa/LINQPadSpy.git
  2. cd in to the ilspy directory cd path\to\cloned\repository\LINQPadSpy\ilspy
  3. Run git submodule foreach git pull origin master
  4. Set the correct HEAD revision for the LINQPadSpy branch git checkout LINQPadSpy
  5. Open the solution in Visual Studio 2012/2013 and add reference to LINQPad.exe to the the LINQPadSpy.Plugin project. Then compile the solution in Release mode and copy the binaries to the LINQPad plugins directory. Be sure to copy all DLL and EXE files except for LINQPad.exe.

Compatibility

  • .NET 4
  • Tested with LINQPad 4.48.01 (Any CPU)

Known issues

  • The first decompilation can be slow but will be quicker thereafter.