【ask】webstorm调试node单个js文件

时间:2021-11-18 10:25:40

The procedure falls into two parts: first we start an application as usual and then connect to it with the debugger.

  1. 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.【ask】webstorm调试node单个js文件
  2. 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【ask】webstorm调试node单个js文件

    • 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.
  3. Run the application with the created configuration.【ask】webstorm调试node单个js文件
  4. 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.【ask】webstorm调试node单个js文件
  5. With the application still running, launch the Node.js Remote Debug configuration (select the configuration in the list and click the Debug toolbar button 【ask】webstorm调试node单个js文件).【ask】webstorm调试node单个js文件
  6. 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.
  7. Switch to WebStorm. In the Debug tool window, step through the breakpoints, switch between frames, change values on-the-fly, examine a suspended programevaluate expressions, and set watches.

【ask】webstorm调试node单个js文件的更多相关文章

  1. 针对单个 js 文件禁用 ESLint 语法校验

    问题描述: 在 Vue-cli 创建的项目中,使用了 ESLint 规范代码的项目中 如何针对单个 js 文件禁用 ESLint 语法校验,但整个项目依然保留 ESLint 的校验规则? 解决方案: ...

  2. 使用webstorm调试node程序

    前言 相信大家接触过不少node代码了,如果你应用的比较初级或者针对你的项目不需要接触过深的node代码,也许你仅仅需要简单的console.log('your variable')就完全满足你的需要 ...

  3. vue项目引入第三方js插件,单个js文件引入成功,使用该插件方法时报错(问题已解决)

    1.引入第三方js文件,npm安装不了 2.控制台显示引入成功 3.在methods下使用 图片看不清请看下面代码 updateTime() { setInterval(()=>{ var cd ...

  4. 使用webstorm调试node&period;js

    折腾半天,还是webstorm顺手,但也遇到一些小问题. 1.代码补全问题 nodeJS自身的补全 File->Project Setting->JavaScript->Librar ...

  5. WebStorm调试node&period;js

    直接上图:

  6. webstorm 设置uglify 压缩js文件

    第一步:打开npm,全局安装 npm install uglify-js -g 第二步: 打开webstorm的file->settings ->External Tools,点击左上角的 ...

  7. webstorm调试Node的时候配置

    点击Edit Configurations的这个的配置:(不能点击是因为目前你选中的不是项目)

  8. 单个 js 文件禁用 ESLint 语法校验

    在代码顶部添加一行注释 /* eslint-disable */ ESLint 在校验的时候就会跳过后面的代码 还可以在注释后加入详细规则,这样就能避开指定的校验规则了 /* eslint-disab ...

  9. 如何调试异步加载的js文件(浏览器调试动态加载js)

    描述 1:jQuery->var obj= new $.js_Obj():等异步加载js文件,执行方法. obj.method(): 2:页面估计不变,通过声明不同的js文件,进行页面内容的转换 ...

随机推荐

  1. 安装opensuse时遇到的一些问题

    1.硬盘安装suse的时候提示找不到源,因为是2块硬盘所以需要mount一下硬盘. 2.安装N卡驱动的时候,推荐一键安装,不然需要把所有GCC和make安装好,并且禁用系统的nouneau.

  2. MsChart在MVC下的问题

    项目为webform和mvc混用,新建了Areas,在Areas目录下的aspx页面的图表无法显示. 解决方案 第一种方法: 将控件的ImageStorageMode设置为UseImageLocati ...

  3. Android的UI设计

    一.Android控件 1.TextView 属性:id.width.height.gravity(对齐方式).textSize(文字大小).textColor(文字颜色) 2.Button 属性:i ...

  4. Fluentd 例子

    0. 安装.启动 安装 curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh 更新:最近貌似会安装 ...

  5. windows查看端口占用

    查看占用端口的进程ID netstat -aon | findstr "9000" 再用进程ID查看进程 tasklist | findstr "6048"

  6. Bootstrap 3 How-To &num;1 下载与配置

    Bootstrap 3 发布了,通过简单的几步,我们就可以使用 Bootstrap 的样式表,图标,以及 javascript 来配置一个简单的站点. 准备 Bootstrap 不仅仅是一个代码集,还 ...

  7. RabbitMQ-清空队列中&lpar;一个channel或连接中&rpar;的Unacknowledged状态的消息

    清空所有:nack 时将参数delivery-tag设为0,multiple设为1. 清空小于等于某delivery-tag的所有消息:nack 时将参数delivery-tag设为正数(介于1和92 ...

  8. Oracle 的几种循环方式介绍

    1 Oracle 中的Goto 用法: declare x number; begin x:=10; --定义的初始值 <<repeat_loop>> --循环点 x:= x- ...

  9. BBS - 预备知识

    一.中介模型 四个项目: 苑昊 博客(BBS) (7-8) CRM 1.权限组件 (3) 2.start组件 -- admin (5) 1.使用 2.源码 django 源码 (面向对象) 以源码为导 ...

  10. 2、gitlab 新建项目

    一.创建项目 1.访问gitlab并登录 http://git.xh.com/ 2.点击 Projects -> Starred projects 每个版本的gitlab不太一样但位置都差不多 ...