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"
}
]
}
To open the Output window, on the menu bar, choose View > Output, or press Ctrl+Alt+O.
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.
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.
By default, VS Code is installed under C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code .
Make sure the Debug Console is visible:
Ctrl + Shift + Y
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With