Ang*_*loC 3 node.js visual-studio-code
使用Visual Studio Code Version 1.13.0,当启动节点调试test2.js时,该节点是版本0.12,配置如下,我可以调试并从vscode响应:
Debugging with legacy protocol because it was detected.
Run Code Online (Sandbox Code Playgroud)
但是当节点是V8.0并且发出'node debug test2.js'时,调试VSCODE得到:
Debugging with legacy protocol because Node.js version could not be determined (Error: read ECONNRESET)
Run Code Online (Sandbox Code Playgroud)
知道为什么吗?我正在使用'attach',配置如下:
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 5858
}
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
]
Run Code Online (Sandbox Code Playgroud)
您需要使用新的"检查器"协议,因为文档说:
{
"type": "node",
"request": "attach",
"name": "Attach (Inspector Protocol)",
"port": 9229,
"protocol": "inspector"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5796 次 |
| 最近记录: |