【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文件,进行页面内容的转换 ...
随机推荐
- iOS:友盟SDK分享
友盟SDK分享 基本步骤: 1.注册友盟开发者账号 2.登陆账号,添加新应用,获取AppKey 3.下载并安装SDK 4.解压SDK压缩包,将形如UMSocial_sdk_x.x.x文件拖入工程中 ...
- http://www.cnblogs.com/monian/p/3822980.html
http://www.cnblogs.com/monian/p/3822980.html
- Selenium——去掉Chrome正受到自动软件测试的控制
selenium打开chrome浏览器时,地址栏下方会出现该提示“Chrome正在受到自动测试软件的控制” public class BasicDriver { public WebDriver dr ...
- Linux命令--mysqld_safe和mysqld区别
Linux命令--mysqld_safe和mysqld区别 学习了:https://blog.csdn.net/Aaroun/article/details/78143832 mysqld_safe ...
- asyncio NetMQ 解决方案编译问题
程序集代码 (原) <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <VersionPrefix& ...
- PuTTY连接Linuxserver常常断线解决方式
PuTTY在远程连接server之后.常常会断线提示"Software caused connection abort",并且常常在非常短的时间内就失去连接. 解决方式例如以下: ...
- 适用于 Charles任 意版 本的 注 册 码
// Charles Proxy License // 适用于Charles任意版本的注册码,谁还会想要使用破解版呢. // Charles 4.2目前是最新版,可用. Registered Name ...
- lodash camelCase 驼峰写法
_.camelCase([string='']) 转换字符串为 驼峰写法 _.camelCase('Foo Bar'); // => 'fooBar' _.camelCase('--foo-ba ...
- js map、filter、forEach
1.map方法 <!DOCTYPE html> <html lang="zh"> <head> <meta charset="U ...
- GCM与C2DM相比有什么不同
eoe介绍:http://wiki.eoe.cn/page/Migration.html 官方地址:http://developer.android.com/google/gcm/c2dm.html