如何在VS代码中调试子Node.JS进程?
下面是我正在尝试调试的代码的示例:
var spawn = require('child_process').spawn;
var scriptPath = './child-script.js';
var runner_ = spawn('node', [scriptPath]);
在visual studio代码上运行简单的节点调试会话失败,并显示以下消息:
Program 'node.dll' failed to run: No application is associated with the specified file
这是来自调试控制台的消息:
C:\Users\<USERNAME>\AppData\Local\Programs\Microsoft VS Code\node.dll --inspect-brk=12232 probe.js
Error processing "launch": Error: spa