Skip to content

Commit a35e215

Browse files
committed
Merge pull request #198 from mousetraps/i120
Fix #120 VS2015 Break on exception does not work with Error() by default
2 parents a602e58 + 421dcd4 commit a35e215

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Nodejs/Product/Nodejs/NodejsPackage.Debugger.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
//
1515
//*********************************************************//
1616

17-
using System;
18-
using System.Collections.Generic;
19-
using System.Linq;
20-
using System.Text;
21-
using System.Threading.Tasks;
2217
using Microsoft.NodejsTools.Debugger.DebugEngine;
2318
using Microsoft.VisualStudio.Debugger.Interop;
2419
using Microsoft.VisualStudioTools;
@@ -27,6 +22,10 @@ namespace Microsoft.NodejsTools {
2722
// Keep declared exceptions in sync with those given default values in NodeDebugger.GetDefaultExceptionTreatments()
2823
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]
2924
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]
25+
#if DEV14_OR_LATER
26+
// VS2015's exception manager uses a different nesting structure, so it's necessary to register Error() explicitly.
27+
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error()", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]
28+
#endif
3029
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EACCES)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]
3130
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EADDRINUSE)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]
3231
[ProvideDebugException(AD7Engine.DebugEngineId, "Node.js Exceptions", "Error", "Error(EADDRNOTAVAIL)", State = enum_EXCEPTION_STATE.EXCEPTION_NONE)]

0 commit comments

Comments
 (0)