1
我想在node.js(7.1.0)項目中使用VS代碼設置遠程調試。VS Code nodejs遠程調試
我啓動我的開發應用與PM2:
{
"apps": [{
"name": "my-app-dev",
"script": "app.js",
"watch": true,
"node_args": ["--inspect=9229", "--nolazy"],
"ignore_watch": ["assets/images/", ".tmp/", ".git/"],
"watch_options": {
"usePolling": true
}
}]
}
這是.vscode/launch.json文件:
{
"version": "0.2.0",
"configurations": [
{
"type": "node2",
"request": "attach",
"name": "attach",
"port": 9229,
"address": "my.app.local",
"restart": true,
"diagnosticLogging": true,
"sourceMaps": false
}
]
}
當我開始我成功地得到重視Debugger attached.
問題是我的斷點被忽略:Unverified breakpoint
因爲調試器必須將遠程計算機上的文件路徑映射到本地計算機上的文件路徑 –