"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"
}
]
}
console.log
是process.stdout
的包装器IO操作,所以它不会显示出来。但是winston
是一个简单的程序,您需要特别配置才能将其写入输出。 - Alexandru Olaru