【ask】webstorm调试node单个js文件
The procedure falls into two parts: first we start an application as usual and then connect to it with the debugger.
- Set the breakpoints in the Node.js code, where necessary. At least one breakpoint is necessary otherwise the program will be just executed. If you want the debugging tool to stop at the first line of your code, set a breakpoint at the first line.

- Create a Node.js run configuration with the following option in the Node parameters text box: --debug-brk==<port for connect to debugger remotely>
Note

- The --debug-brk option allows you to debug the code executed on start.
- The --debug option is useful when you are not going to debug Node.js right now, but you want to debug it later.
- Run the application with the created configuration.

- Create a Node.js Remote Debug configuration: in the Debug port text box, type the port number specified in the currently running Node.js configuration.

- With the application still running, launch the Node.js Remote Debug configuration (select the configuration in the list and click the Debug toolbar button
).
- In the Run tool window, copy the URL address of the server and open the corresponding page in the browser. Control over the debugging session returns to WebStorm.
- Switch to WebStorm. In the Debug tool window, step through the breakpoints, switch between frames, change values on-the-fly, examine a suspended program, evaluate expressions, and set watches.
【ask】webstorm调试node单个js文件的更多相关文章
- 针对单个 js 文件禁用 ESLint 语法校验
问题描述: 在 Vue-cli 创建的项目中,使用了 ESLint 规范代码的项目中 如何针对单个 js 文件禁用 ESLint 语法校验,但整个项目依然保留 ESLint 的校验规则? 解决方案: ...
- 使用webstorm调试node程序
前言 相信大家接触过不少node代码了,如果你应用的比较初级或者针对你的项目不需要接触过深的node代码,也许你仅仅需要简单的console.log('your variable')就完全满足你的需要 ...
- vue项目引入第三方js插件,单个js文件引入成功,使用该插件方法时报错(问题已解决)
1.引入第三方js文件,npm安装不了 2.控制台显示引入成功 3.在methods下使用 图片看不清请看下面代码 updateTime() { setInterval(()=>{ var cd ...
- 使用webstorm调试node.js
折腾半天,还是webstorm顺手,但也遇到一些小问题. 1.代码补全问题 nodeJS自身的补全 File->Project Setting->JavaScript->Librar ...
- WebStorm调试node.js
直接上图:
- webstorm 设置uglify 压缩js文件
第一步:打开npm,全局安装 npm install uglify-js -g 第二步: 打开webstorm的file->settings ->External Tools,点击左上角的 ...
- webstorm调试Node的时候配置
点击Edit Configurations的这个的配置:(不能点击是因为目前你选中的不是项目)
- 单个 js 文件禁用 ESLint 语法校验
在代码顶部添加一行注释 /* eslint-disable */ ESLint 在校验的时候就会跳过后面的代码 还可以在注释后加入详细规则,这样就能避开指定的校验规则了 /* eslint-disab ...
- 如何调试异步加载的js文件(浏览器调试动态加载js)
描述 1:jQuery->var obj= new $.js_Obj():等异步加载js文件,执行方法. obj.method(): 2:页面估计不变,通过声明不同的js文件,进行页面内容的转换 ...
随机推荐
- ajax不运行success回调而是运行error回调
调试代码遇到一个问题,就是前台运行删除操作后,controller返回数据,但前台接收时,ajax不运行success回调,总是弹出失败的对话框.接收数据类型是json. 先看看我的前台代码. if ...
- Idea 代码编辑错误不飘红提示
Power Save Mode 勾选去掉即可
- 19、Cocos2dx 3.0游戏开发找小三之Action:流动的水没有形状,漂流的风找不到踪迹、、、
重开发人员的劳动成果.转载的时候请务必注明出处:http://blog.csdn.net/haomengzhu/article/details/30478985 流动的水没有形状.漂流的风找不到踪迹. ...
- C++11 新特性之 变长參数模板
template <typename ... ARGS> void fun(ARGS ... args) 首先明白几个概念 1,模板參数包(template parameter pack) ...
- Nginx通过CORS实现跨域(转)
如果前端有nginx方向代理,跨域配置在前端反向代理nginx上 要做跨域域名限制 什么是CORS CORS是一个W3C标准,全称是跨域资源共享(Cross-origin resource shari ...
- nginx 根据域名反向代理
#nginx 反向代理域名,会根据启动时候解析出来的ip,加载到内存中,后面不会改变可以绑定hosts或者指定resolve服务器来固定ip #注意proxy最后的斜杠,如果不加会将请求过来的目录带到 ...
- 保存Hive查询结果的方法
很多时候,我们需要将Hive的查询(select)结果保存起来,方便进一步处理或查看.在Hive里面提供了不同的方式来保存查询结果,在这里做下总结: 一.保存结果到本地 方法1:调用hive标准输出, ...
- zendstdio的智能提示功能
在项目的include的那个地方邮寄,在addsource file 然后指向TP类库的文件夹,刷新项目即可有智能提示
- jpeg错误打印结构
struct jpeg_error_mgr { /* Error exit handler: does not return to caller */ JMETHOD(void, error_exit ...
- html-解决乱码问题
1.创建HTML时,需将文件编码设置为UTF-8: 2.需要在<head>元素下,借用<meta>元素设置内容的编码: 1)文件的编码:在webstorm中设置文件编码的问题: ...