Debugging LINQPad execution with ILSpy 2.0

edited April 2012
Hi.

I found with ILSpy 2.0, it is possible to attach to LINQPad and debug the code
in a LINQPad script. The script assembly can be found by adding this to the
script:

Assembly.GetExecutingAssembly().Location.Dump();

Because the assembly is rebuilt with a different filename each time a
change is made to the script and it is run, you can't change the script
once you've run it to get the filename, until finished debugging.

Comments

  • Have you tried inserting Debugger.Break() or Debugger.Attach() into the script?
  • I use
    if(Debugger.IsAttached) Debugger.Break()
    All the time when I have a long complicated linqpad file and need to debug a portion of the script. Very handy. Just attach to the linqpad process from Visual Studio.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!