Visual Studio 2017 Node.js异常不起作用 [英] Visual Studio 2017 Node.js Exceptions not working

查看:70
本文介绍了Visual Studio 2017 Node.js异常不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用VS 2017 Professional开发Node.js.调试通常可以正常进行,但是当引发未捕获的异常时,nodejs进程将立即停止,并且我没有任何更改可以跟踪该问题.我也已在调试器设置中启用了nodejs exption,但仍然没有成功.如何设置VS以显示C#开发中的异常?谢谢!

解决方案

我使用VS2017测试了一个简单的示例,即使我使用VS2017 Enterprise版本,它也可以很好地工作.

(1)请确保您使用最新的VS2017版本.15.7.3.

(2)请确保您安装了最新的Node.js版本.

I just started Node.js development with VS 2017 Professional. Debugging generally works but when a uncaught exception is thrown the nodejs process is stopping immediately an i have no change to track the issue. I have also enabled the nodejs exptions in the debugger settings, but still no success. How can i setup VS to show the exceptions like in the C# development? Thanks!

解决方案

I test a simple sample using VS2017, it works well in my side even if I use the VS2017 Enterprise version.

(1) Please make sure that you use the latest VS2017 version. 15.7.3.

(2) Please make sure that you install the latest Node.js version.

https://nodejs.org/en/

(3) Enable the Exceptions settings like the following screen shot. And enable "Use the new Exception Helper" option under TOOLS->OPTIONS->Debugging.

这篇关于Visual Studio 2017 Node.js异常不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆