#line hangs a run with an exception
This occurs in v4 and v5, and with both
Simplest example, in a new C# Statement(s) query:
With a more complex query, where I create my own exception that explicitly includes
There's also a syntax highlight failure within
This is also a feature request that you add these to the backend code you're generating so our stack traces show valid line numbers and the filenames we're using :-)
#line
in C# and #ExternalSource
in VB.NET.Simplest example, in a new C# Statement(s) query:
Interaction.Beep(); #line 2 "Query3" throw new Exception();When you run this, the
Beep()
occurs (via Microsoft.VisualBasic
), and then just waits on something. The UI is still interactive, and trying a debug run and breaking shows nothing useful in any of the tabs.With a more complex query, where I create my own exception that explicitly includes
Environment.StackTrace
calls, the #ExternalSource
lines themselves are working properly, but if one begins before the exception is thrown the query hangs on the exception.There's also a syntax highlight failure within
#ExternalSource
in v5 VB.NET.This is also a feature request that you add these to the backend code you're generating so our stack traces show valid line numbers and the filenames we're using :-)
Comments
LINQPad also inserts its own #line directives in certain situations, so inserting your own messes with this, too.
Is there any specific reason you need to do this?
So, no explicit reason, except as I mentioned at the end: we can see SomeQuery.linq, rather than query_random.vb, in stacktraces.