Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99124

How can I debug sub-process in vscode?

$
0
0

I am using execa to spawn a sub-process in index.js, but I can't debug the spawned file(log_ok.js). this is the code, does anyone know how to debug it?

index.js

const execa = require('execa');

execa('node', ['./log_ok.js'], { stdio: 'inherit' })

and my launch.json:

{
      "type": "node",
      "request": "launch",
      "name": "debug",
      "program": "${workspaceFolder}/index.js",
      "autoAttachChildProcesses": true
    }

./log_ok.js

console.log('ok')

Viewing all articles
Browse latest Browse all 99124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>