使用visual studio code调试单个js文件
1.添加配置2.选择Node.js Launch Program生成基本配置3.修改配置信息4. 运行js文件进行debug调试5. 若出现以下报错信息,请添加node环境6. 成功进入debug调试请参考以下步骤
1.添加配置
2.选择Node.js Launch Program生成基本配置
3.修改配置信息
4. 运行js文件进行debug调试
5. 若出现以下报错信息,请添加node环境
Can’t find Node.js binary “node”: path does not exist. Make sure Node.js is installed and in your PATH, or set the “runtimeExecutable” in your launch.json
{"version": "0.2.0","configurations": [{"name": "Launch Program","program": "${workspaceFolder}/test/validate.joi.js","request": "launch","skipFiles": ["<node_internals>/**"],"type": "node","runtimeExecutable": "/usr/local/bin/node(务必是你本机的node地址)"}]}