I've a project that i'm using Bunyan logger as logger agent. But the Bunyan logs with the json format the debug texts, and this make difficult to read the output:
But Bunyan provides a CLI tool to humanize the log that converts the JSON to a readable text:
What I want's is create an extension to enable Bunyan console format to the Debug output text, automatic transforming the json output to debug text. But in VSCode extension development API I couldn't find any reference to manipulate debug console. I if can manipulate de Debug console message, I could return te messages well formatted as Bunyan format. So my question is if have some documentation to manipulate debug console messages or how i can work with debug console messages in my vscode extension.
Alternatively, you can run your configuration through the Command Palette (Ctrl+Shift+P) by filtering on Debug: Select and Start Debugging or typing 'debug ' and selecting the configuration you want to debug. In addition, the debug status appears in the Status Bar showing the active debug configuration.
In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).
I have found the answer by myself. I can do this simply changing my Debugger configurations, setting args and console type as the follow:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/app.js",
"cwd": "${workspaceRoot}",
"args": [
"|",
"bunyan"
],
"console": "integratedTerminal"
}
]
}
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