Hi guys,
thank you for your work.
I have an issue running pino with node --inspect-brk, option used to debug in visual studio code, it does not print to console
to reproduce
pino.js
const log = require('pino')()
log.info('message')
node --inspect-brk=37655 test/pino.js
pino version: 5.10.6 and 4.17.6
node version: 8.15.0
By console, you mean the console in VSCode?
You can use https://github.com/pinojs/pino-inspector with Node 10 in that case.
What do you think about this? Is a bad idea?
https://github.com/braceslab/synthetic-pino
I just want to output to console during development and use pino destinations in production
I'm missing to understand how/why pino-inspector does not get that job done. It's actually built for that purpose.
I must use node v. 8.x
That solution is suboptimal because it's likely to have some edge cases in compatibility, however it will work. I'll recommend to migrate to Node 10 asap anyway.
Use outputCapture in your launch configuration https://code.visualstudio.com/updates/v1_17#_viewing-output-from-direct-stdoutstderr-writes
Thanks @jsumners!
Most helpful comment
Use
outputCapturein your launch configuration https://code.visualstudio.com/updates/v1_17#_viewing-output-from-direct-stdoutstderr-writes