[英]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. 我正在调试Visual Studio 2015上的Node.js应用程序。它工作得很好,但有一个问题我发现很大的浪费时间。 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. 在Visual Studio上调试基于浏览器的JavaScript时,它可以更好地工作,无论何时抛出错误,调试器都会停止,这非常棒。
Is it possible to get the Visual Studio debugger to halt when the debugged program running on Node.js throws an error? 当Node.js上运行的调试程序抛出错误时,是否可以让Visual Studio调试器暂停?
You could install the Node.js Tools for Visual Studio and use the Exception settings windows under Debug->Windows. 您可以为Visual Studio安装Node.js工具,并使用Debug-> Windows下的Exception设置窗口。 It would throw or catch the Exception. 它会抛出或捕获异常。
http://nodejstools.codeplex.com/discussions/538432 http://nodejstools.codeplex.com/discussions/538432
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.