Verbose logs are written to /var/folders/gx/bcrb5wxj3fqcvvnb4l1nkglh0000gn/T/vscode-node-debug2.txt
10:42:07 PM, 1/9/2017
OS: darwin x64
Adapter node: v6.5.0 x64
vscode-chrome-debug-core: 3.8.1
node-debug2: 1.8.6
›From client: initialize({"adapterID":"node2","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true})
›To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":true}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true}}
›From client: launch({"type":"node2","request":"launch","name":"启动程序","verboseDiagnosticLogging":true,"program":"/Users/tihu/wacai/routers_service/server/server.js","cwd":"/Users/tihu/wacai/routers_service","runtimeExecutable":"/Users/tihu/wacai/routers_service/node_modules/.bin/babel-node","env":{"NODE_ENV":"development"},"sourceMaps":true})
Launch: program '/Users/tihu/wacai/routers_service/server/server.js' seems to be the generated file
/Users/tihu/wacai/routers_service/node_modules/.bin/babel-node --inspect=11317 --debug-brk server/server.js
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
repeat for several times
›To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":false,"message":"Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:11317).","body":{"error":{"id":2010,"format":"Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).","variables":{"_error":"Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:11317","_timeout":"10000"}}}}
›From client: disconnect({"restart":false})
Killing process with id: 2167
Terminated: Got disconnect request
›To client: {"seq":0,"type":"event","event":"terminated"}
›To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}
Target exited
Terminated: Target exited
Target closed
Terminated: Target closed
this is the launch.json
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node2",
"request": "launch",
"name": "启动程序",
"verboseDiagnosticLogging": true,
"program": "${workspaceRoot}/server/server.js",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
"env": {
"NODE_ENV": "development"
},
"sourceMaps": true
},
{
"type": "node",
"request": "attach",
"name": "附加到进程",
"port": 5858
}
]
}
but another project of mine has the same lanuch.json, and it works
Verbose logs are written to /var/folders/gx/bcrb5wxj3fqcvvnb4l1nkglh0000gn/T/vscode-node-debug2.txt
10:42:07 PM, 1/9/2017
OS: darwin x64
Adapter node: v6.5.0 x64
vscode-chrome-debug-core: 3.8.1
node-debug2: 1.8.6
›From client: initialize({"adapterID":"node2","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true})
›To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":true}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true}}
›From client: launch({"type":"node2","request":"launch","name":"启动程序","verboseDiagnosticLogging":true,"program":"/Users/tihu/wacai/routers_service/server/server.js","cwd":"/Users/tihu/wacai/routers_service","runtimeExecutable":"/Users/tihu/wacai/routers_service/node_modules/.bin/babel-node","env":{"NODE_ENV":"development"},"sourceMaps":true})
Launch: program '/Users/tihu/wacai/routers_service/server/server.js' seems to be the generated file
/Users/tihu/wacai/routers_service/node_modules/.bin/babel-node --inspect=11317 --debug-brk server/server.js
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
Discovering targets via http://127.0.0.1:11317/json
HTTP GET failed: Error: connect ECONNREFUSED 127.0.0.1:11317
repeat for several times
›To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":false,"message":"Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:11317).","body":{"error":{"id":2010,"format":"Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).","variables":{"_error":"Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:11317","_timeout":"10000"}}}}
›From client: disconnect({"restart":false})
Killing process with id: 2167
Terminated: Got disconnect request
›To client: {"seq":0,"type":"event","event":"terminated"}
›To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}
Target exited
Terminated: Target exited
Target closed
Terminated: Target closed
this is the launch.json
but another project of mine has the same lanuch.json, and it works