node.jsvisual-studio-codeoutputconsole.logwinston

Winston Logger - NodeJs Debug console logs not showing in VSCode


I'm using VSCode debugger and winston logger for NodeJS, but can't see output from application unless I specify external terminal like this:

"version": "0.2.0",
"configurations": [
    {
        "type": "node",
        "request": "launch",
        "name": "Launch Program",
        "program": "${workspaceFolder}/server.js",
        "console": "externalTerminal"
    }
]

Is there way to see that output in output window, like when i start code using CodeRunner plugin?


Solution

  • When using a logger that outputs to

    process.stdout.write

    you can use

    "outputCapture": "std" in the launch config to also capture that.