基于vscode:
1:点击创建一个launch.json,选择Node.js

image
2:修改program中index.js为你想要调试的文件

image
3:点击launch Program即可启动调试

image
基于webstrom:
1:点击Edit Configurations

image
2:点击+,选择nodejs

image
3:配置要执行的文件及命令

image
4:点击调试图标,即会执行node index.js --help,并启动调试

image

image