Parse-only/Build-only mode without Executing
SQL Server Management Studio has a Parse (Ctrl-F5) feature under the Query menu vs. Execute (F5); and Visual Studio has a Build Solution vs. Start Debugging (F5). Both of these options allow you to check for syntax or compile errors without executing the query or running the program. I was surprised not to find this feature in LINQPad also. This would be a very useful feature to me. I hope we could see it in an upcoming release. Thanks, I love LINQPad!
-
Lance May commented
We just use "bubble tests" in our scripts at work to get around this. Basically just use a #if !CMD block that displays something in the results, waits ~5 seconds, then clears the results and continues. But yeah, a Ctrl+F5, F6, whatever would be pretty great too.
-
petho.pal commented
Hi, Agree, such a function would be very nice!
Only a workaround: you can use
lprun.exe -compileonly -
Chad Schouggins commented
Being able to see results in the SQL, IL, etc tabs without running would be great.
-
Mark Hurd commented
And the feature is already half-implemented by Save for MyExtensions!
-
Keith Hall commented
just realised that lprun has this ability with the -compileonly option... :)
-
Fawad Raza commented
Yes Please!
-
neuro commented
I was also surprised not to be able to pre-parse the code; I keep instinctively pressing F6 to compile the code (statements mode)...
-
Dan Puza commented
BTW, in the meantime you can work around this by adding return; as the first statement if your query type is C# statements. Or for the first line of your Main() if your query type is C# program. (Kind of obvious, but thought I would point this out anyway. I wasn't sure if it would work for the C# statements query type.)
Still, a dedicated button like SQL Server Management Studio would be ideal!
-
Dan Puza commented
oops, I accidentally posted this anonymously while I was not logged in. :-( Sorry for the double voting, but this would be a good feature...