使用版本1.13.0,当启动节点调试test2.js时,该节点为0.12版本,配置如下,我可以从vscode进行调试和响应:
Debugging with legacy protocol because it was detected.但是,当节点为V8.0,并发出“nodebugtest2.js”时,调试VSCODE得到:
Debugging with legacy protocol because Node.js version could not be determined (Error: read ECONNRESET)知道为什么吗?我使用的是“附加”,配置如下:
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 5858
}
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
]发布于 2017-06-16 10:33:08
如文档所述,您需要使用新的“检查器”协议:
{
"type": "node",
"request": "attach",
"name": "Attach (Inspector Protocol)",
"port": 9229,
"protocol": "inspector"
}发布于 2017-08-24 02:11:32
如果您仍然得到错误:调试与遗留协议,因为node.js版本无法确定
使用以下步骤:
它适用于Visual代码版本1.15.1;节点版本8.4.0
https://stackoverflow.com/questions/44534656
复制相似问题