Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is stdout for VS Code?

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"
    }
  ]
}
like image 981
Old Geezer Avatar asked Aug 12 '18 16:08

Old Geezer


People also ask

Where is the output in VS Code?

To open the Output window, on the menu bar, choose View > Output, or press Ctrl+Alt+O.

How do you display only output in VS Code?

In the file, you will the line ”console”: “integratedTerminal” . Now change it to “console”:”internalConsole”. Open your code file and click “RUN” at the top again. Finally if you click on “Run without debugging” button, the output of your code will be display in “Debug Console” at where the terminal is.

How do I find the port in VS Code?

Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter. Port helps you check availability of a port, get an available port, or kill running process on a port from Visual Studio Code itself.

How do I find my VS Code path?

By default, VS Code is installed under C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code .


2 Answers

Make sure the Debug Console is visible:

Ctrl + Shift + Y

like image 72
JDawg Avatar answered Oct 10 '22 11:10

JDawg


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.

like image 22
Mark Avatar answered Oct 10 '22 10:10

Mark