Be able to set breakpoints in LinqPad
Be able to set breakpoints within the LinqPad IDE as well as perform a debugging session for the Linq Expressions in a manner similar to the Visual Studio IDE.
I’m marking this as complete because it was implemented as part of the debugger, back in 2014.
-
Dash commented
I'd like to point out that with the new debugger and it's new process isolation model, you don't just use VS to connect to 'LinqPad' but you look at the PID in the taskbar in Linqpad for the query process's PID to connect to.
-
rob commented
"Just put in your code:
Debugger.Launch();
This will prompt for the debugger to use depending on the versions of Visual Studio's that you have installed.
Choose one and start debugging in it."
seriously, just when i thought linqpad couldn't get any better.
it seems silly, but i cannot imagine what it would be like had i not just stumbled across it on stackoverflow a few months ago. it has literally changed my entire job and programming abilities. i have learned more since i got it than the years of 'casual' programming beforehand
-
Yo commented
Just put in your code:
Debugger.Launch();
This will prompt for the debugger to use depending on the versions of Visual Studio's that you have installed.
Choose one and start debugging in it.
-
Jeremy Schwartz commented
@John - at least according to LinqPad4, it's no longer a method, but a property:
`if( Debugger.IsAttached ) Debugger.Break();`
-
John commented
You can do this already:
if(Debugger.IsAttached()) Debugger.Break();
Now go to Visual Studio and from the debug menu choose attach to process. Click LINQPad, and then run your query in linqpad. When it reaches that line the VS debugger will break and you can single step through your code as you would normally.