Node.js console gets closed immediately after i execute the program from Visual Studio 2012 in Windows 8(我在 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() 之外,还有其他方法可以解决它吗?(为什么Node.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 控制台立即关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我在 Windows 8 中从 Visual Studio 2012 执行程序后,Node.js 控制台立即关闭
				
        
 
            
        基础教程推荐
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
 - Node.js 有没有好的索引/搜索引擎? 2022-01-01
 - Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
 - 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
 - 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
 - 每次设置弹出窗口的焦点 2022-01-01
 - 什么是不使用 jQuery 的经验技术原因? 2022-01-01
 - WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
 - 如何在特定日期之前获取消息? 2022-01-01
 - jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				