Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

console.log is not printing to Debug Console in Visual Studio Code

I have created launch.json file exactly as this for debugging my Electron Application on VS Code. But the console.log() not printing anything to the debug console.

If I add "console": "integratedTerminal" to launch.json the log displays on the built in terminal. I want the log to be displayed on debug console. How can I fix it?

like image 375
Aslam Avatar asked Feb 12 '19 17:02

Aslam


1 Answers

In the launch.json configuration you are using, add "outputCapture": "std"

example

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "outputCapture": "std",
      ...
  }
  ]
}

like image 146
jabu.hlong Avatar answered Oct 01 '22 14:10

jabu.hlong