125 - issue, that requests .NET Core 2.0 / 2.1 debugging support
Changes
Added DebuggerExtensions class which enables waiting for the debugger to attach in the loop, inspecting Debugger.IsAttached property with interval (50ms). Also it has 10 minutes timeout, after it, function will continue executing without debugging;
Added --debugger-spin-wait flag handling, if it supplied as an argument, then, we will use DebuggerExtensions.TryWaitForAttaching to wait for the debugger before proceeding to execution;
Added try / catch block for all body of Main to prevent user from hanging on External Code Exception while debugging.
Side note
I've closed #127 as it had a lot of unnecessary stuff. Now this PR has only required changes, to proceed with #125.
Original issue
125 - issue, that requests .NET Core 2.0 / 2.1 debugging support
Changes
DebuggerExtensions
class which enables waiting for the debugger to attach in the loop, inspectingDebugger.IsAttached
property with interval (50ms). Also it has 10 minutes timeout, after it, function will continue executing without debugging;--debugger-spin-wait
flag handling, if it supplied as an argument, then, we will useDebuggerExtensions.TryWaitForAttaching
to wait for the debugger before proceeding to execution;try / catch
block for all body ofMain
to prevent user from hanging onExternal Code Exception
while debugging.Side note
I've closed #127 as it had a lot of unnecessary stuff. Now this PR has only required changes, to proceed with #125.