From 6842f06c7e6c9a62d679cbccb244e4bac90b0e49 Mon Sep 17 00:00:00 2001 From: Sara Itani Date: Tue, 9 Jun 2015 08:17:23 -0700 Subject: [PATCH] Fix #120 VS2015 Break on exception does not work with Error() by default --- Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs b/Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs index fd894f884..dc8496d3e 100644 --- a/Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs +++ b/Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs @@ -14,11 +14,6 @@ // //*********************************************************// -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.NodejsTools.Debugger.DebugEngine; using Microsoft.VisualStudio.Debugger.Interop; using Microsoft.VisualStudioTools; @@ -27,6 +22,10 @@ namespace Microsoft.NodejsTools { // Keep declared exceptions in sync with those given default values in NodeDebugger.GetDefaultExceptionTreatments() [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)] [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)] +#if DEV14_OR_LATER + // VS2015's exception manager uses a different nesting structure, so it's necessary to register Error() explicitly. + [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error()", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)] +#endif [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EACCES)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)] [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EADDRINUSE)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)] [ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EADDRNOTAVAIL)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]