在 winston logging 期间在 visual studio code 的终端上作为“node app”运行时,输出控制台日志。 但是visual studio的debug console选项卡不打印console log。 为什么?
最佳答案
下面是我的 launch.json
关键是 "outputCapture": "std",
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"outputCapture": "std", //key is this line
"program": "${workspaceFolder}/bin/www"
}
]
}
关于Node.JS Winston 日志记录,Visual Studio 调试控制台不打印,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45539958/