I have a typescript remote platform project, using visual studio code (V1.28.2) as IDE. Node.js is started on platform, using the command node --inspect=0.0.0.0:9229 --inspect-brk=0.0.0.0:9229 ... there.
In visual studio code the launch.json file defines an attach request:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Launch on RPI",
"sourceMaps": true,
"smartStep": true,
"stopOnEntry": false,
"port": 9229,
"address": "192.168.1.2",
"restart": false,
"localRoot": "${workspaceRoot}/",
"remoteRoot": "/home/pi/remoteproject/"
}
]
}
```
Everything is working fine (starting, debugging, ...). But there is one issue I cannot understand.
A call of console.log('Hello'); is written in the Debug console window of code.
A call of process.stdout.write('Hello\n'); is suppressed there.
If the program is started inside a shell on the remote platform, both statements are printed out.
What is the reason for this different behavior? How I can redirect stdout to to visual studio code Debug console (or terminal) window?
It's just how they've setup the integrated terminal, you can enable stdout by adding the "outputCapture": "std" flag to the configuration
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