17

I am running Node.js in VS Code. I see output of console.log in the Debug Window.

Where does process.stdout.write go to? I can't find it in the Debug Console or any of the Output windows.

My launch.json is simply this:

"configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/job.js"
    }
  ]
}
Old Geezer
  • 14,854
  • 31
  • 111
  • 198

3 Answers3

28

Looking at issues with process.stdout.write the suggested fixes are adding these to your launch config:

"console": "internalConsole", 
"outputCapture": "std",

Especially the outputCapture entry is important.

Mark
  • 143,421
  • 24
  • 428
  • 436
3

Make sure the Debug Console is visible:

Ctrl + Shift + Y

JDawg
  • 8,560
  • 4
  • 25
  • 29
2

Can you try to add "console": "internalConsole" to your config and see if it works?

As per the docs these are the available options for the console:

console - what kind of console to use, for example, internalConsole, integratedTerminal, externalTerminal

Akrion
  • 18,117
  • 1
  • 34
  • 54