简体   繁体   中英

How to halt Visual Studio debugger automatically on error on Node.js?

I'm debugging Node.js application on Visual Studio 2015. It works great but there is one issue I find a big time-waster. If my program runs into an error I see the error on the console, but debugger does NOT stop where the error happened. I have to look up the line-number from the console-log then locate that line in the source-code.

It works better when debugging browser-based JavaScript on Visual Studio, the debugger halts whenever an error is thrown, which is REALLY great.

Is it possible to get the Visual Studio debugger to halt when the debugged program running on Node.js throws an error?

You could install the Node.js Tools for Visual Studio and use the Exception settings windows under Debug->Windows. It would throw or catch the Exception.

http://nodejstools.codeplex.com/discussions/538432

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM