每当我尝试运行调试器时,都会不断出现此错误:
这是调试配置:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/server/bin/www",
"envFile": "${workspaceRoot}/server/.env"
}
]
}
----更新----
我正在使用VScode 1.49.0版本
如@ S.Clarke876所述,它似乎是VS Code中的错误,应在下一版本中修复。参见:https : //github.com/microsoft/vscode/issues/106484#issuecomment-691202789
您可以通过添加"outputCapture": "std"
到launch.json
文件中解决此问题。
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/server/bin/www",
"envFile": "${workspaceRoot}/server/.env",
"outputCapture": "std"
}
]
}
为我工作!它似乎仅在npm软件包debug
尝试写出到控制台时才发生。即console.log
很好。
再次感谢@ S.Clarke876!仅添加此答案,因为我差点错过了您的评论。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句