3

I am trying to attach VS2010 debugger to Linqpad so that when I use classes from my c# project I can add breakpoints and have Linqpad execution halt.

But this does not work, Linqpad happily executes and finishes without hitting my breakpoints.

Now, I read a bit on Linqpad and it executes every "query" in its own process, does this in any way fool VS2010 so that the process I attach to is not the one executing my objects?

And if that is the case, is there a way around this so that I can get debugging with Linqpad to work?

David Mårtensson
  • 7,550
  • 4
  • 31
  • 47

1 Answers1

5

Found out that since Linqpad creates a new appdomain for each query window you cannot currently bind visual studio to it directly.

You have to set debugger.break() in your source code to trigger a request for opening a debugger.

This is not the best solution as it means I have to change the source back and forth and cannot use normal breakpoints but it works. Found a better one my self.

You can not attach Visual Studio to LinqPad and at least trace the code in your VS project.

Unfortunately you cannot trace the linqpad part of the code thiw way.

If anyone should find a better solution, please share it with me.

Found a new thread with a better solution

How to debug LinqPad query in Visual Studio Debugger?

Community
  • 1
  • 1
David Mårtensson
  • 7,550
  • 4
  • 31
  • 47