vscode远程调试node服务端

    {
            "type": "node",
            "request": "attach",
            "name": "调试名称",
            "address": "远程调试IP地址",
            "port": 端口号,
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "远程项目绝对地址",
            "restart": true,
            "protocol": "inspector"
    }

如果出现无法连接到远程主机 ECONNREFUSED的情况,需要在远程机器上的启动命令里面改一下inspect的ip地址,如下:

node --inspect=0.0.0.0:端口号

猜你喜欢

转载自www.cnblogs.com/demonrain/p/8933158.html