Web Express 2013
Debug build CL1197433 (the changeset which introduced changes to debugging console app)
I couldn't repro again. VM was extremely slow at the time when this happened.
Create new TypeScript console app
F5
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
An unhandled exception is about to terminate the process. Exception info:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.Send(IDebugEvent2 eventObject, String iidEvent, IDebugProgram2 program, IDebugThread2 thread)
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.Send(IDebugEvent2 eventObject, String iidEvent, IDebugThread2 thread)
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.OnThreadExited(Object sender, ThreadEventArgs e)
at Microsoft.NodejsTools.Debugger.NodeDebugger.OnConnectionClosed(Object sender, EventArgs args)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Microsoft.NodejsTools.Debugger.Communication.DebuggerConnection.<ReadStreamAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
at Microsoft.VisualStudioTools.Project.UIThread.<Initialize>b__9(Object sender, UnhandledExceptionEventArgs args)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
---------------------------
Abort Retry Ignore
---------------------------
```
Comments: The one that I've seen was caused by ThreadExited event firing after ProcessExited, because the main debugger loop called Close before reporting ThreadExit for main thread, and Close killed the node process. I believe your changes should fix that, too, since you moved that Close around.
Debug build CL1197433 (the changeset which introduced changes to debugging console app)
I couldn't repro again. VM was extremely slow at the time when this happened.
Create new TypeScript console app
F5
```
---------------------------
Assertion Failed: Abort=Quit, Retry=Debug, Ignore=Continue
---------------------------
An unhandled exception is about to terminate the process. Exception info:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.Send(IDebugEvent2 eventObject, String iidEvent, IDebugProgram2 program, IDebugThread2 thread)
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.Send(IDebugEvent2 eventObject, String iidEvent, IDebugThread2 thread)
at Microsoft.NodejsTools.Debugger.DebugEngine.AD7Engine.OnThreadExited(Object sender, ThreadEventArgs e)
at Microsoft.NodejsTools.Debugger.NodeDebugger.OnConnectionClosed(Object sender, EventArgs args)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Microsoft.NodejsTools.Debugger.Communication.DebuggerConnection.<ReadStreamAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
at Microsoft.VisualStudioTools.Project.UIThread.<Initialize>b__9(Object sender, UnhandledExceptionEventArgs args)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__5(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
---------------------------
Abort Retry Ignore
---------------------------
```
Comments: The one that I've seen was caused by ThreadExited event firing after ProcessExited, because the main debugger loop called Close before reporting ThreadExit for main thread, and Close killed the node process. I believe your changes should fix that, too, since you moved that Close around.