从Windows 8中的Visual Studio 2012执行程序后,Node.js控制台立即关闭 [英] Node.js console gets closed immediately after i execute the program from Visual Studio 2012 in Windows 8

查看:174
本文介绍了从Windows 8中的Visual Studio 2012执行程序后,Node.js控制台立即关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在 Windows 8 PC中安装了Node.js,并为 Visual Studio 2012 安装了Node.js插件。我从Visual Studio 2012执行了一个基本程序,它只是在控制台上打印一个字符串

I have installed Node.js in Windows 8 PC and installed the Node.js plugin for Visual Studio 2012. I executed a basic program from Visual Studio 2012 which just prints a string on console

consol.log("Hi There");

Node.js控制台打印 Hi There 并立即终止。任何人都可以提供修复它的解决方案吗?

The Node.js console prints "Hi There" and immediately terminates itself. Can anyone provide a solution to fix it?

我遇到过类似的问题,除了使用 setTimeOut之外还有其他方法可以修复它吗?代码中的()
为什么节点。 js脚本控制台在Windows 8中立即关闭?

I have gone through a similar question, is there any other way to fix it apart from using setTimeOut() in the code? (Why does the Node.js scripts console close instantly in Windows 8?)

推荐答案

从Visual Studio的调试菜单中选择选项 。在此之后选择NodeJS Tools并勾选当进程正常退出时等待输入复选框。

From the Debug menu in Visual Studio choose "Options". After this choose "NodeJS Tools" and tick the checkbox "Wait for input when process exits normally".

这篇关于从Windows 8中的Visual Studio 2012执行程序后,Node.js控制台立即关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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