简体   繁体   中英

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?

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

example

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM