-
进入远程服务器通过以下命令启动待调试的NodeJS应用
node --inspect=0.0.0.0 <启动应用程序.js> -
进入VSCode项目根目录,打开
.vscode/launch.json在 configurations 中增加以下配置:1{ "type": "node", "request": "attach", "name": "Node Remote Debug", "address": "远程服务器地址", "port": 9229, #端口 "localRoot": "${workspaceFolder}", "remoteRoot": "远程服务器上执行脚本的根目录" }
VSCode中远程调试NodeJS配置
📂 游戏开发
📝 168 字
⏱️ 1 min
目录
1 节