【发布时间】:2017-07-10 19:43:55
【问题描述】:
我正在尝试调试我的 express 应用程序,我已根据 vs 代码(1.13 版)帮助文档配置了我的 IDE。但是当我运行应用程序时,该过程永远不会在断点处停止。
我们正在开发一个使用 webpack/babel 的 react (redux)/node/express 应用程序。
通常的启动脚本在 3000/8443(安全)中启动我们的应用程序。 请找到我的启动配置文件(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": "node",
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": [
"start",
"debug"
],
"env": {
"NODE_ENV": "development"
},
"console": "integratedTerminal",
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*/.js"],
"port": 5858
}
]
}
在启动时,我们收到以下错误:
Cannot connect to runtime process, timeout after 10000 ms - (reason:
Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:5858).
我在这里遗漏了什么吗? 我正在使用 osx (10+) 进行开发
谢谢, 桑托什
【问题讨论】:
-
你使用的是node v6.3.0+吗?
标签: node.js debugging express webpack visual-studio-code