probe-rs / vscode

VSCode debug extension for probe-rs. It uses the MS DAP protocol to communicate directly with the probe (via probe-rs), and supports basic command line debugging in addition to VSCode UI.
https://probe.rs/
Other
65 stars 5 forks source link

[Feature request] Colorful defmt log #76

Closed HaoboGu closed 6 months ago

HaoboGu commented 6 months ago

Hello, I'm using probe-rs-vscode plugin with defmt rtt logger. When I use probe-rs run in cli, it prints logs with color:

image

But when I do debugging using probe-rs-vscode plugin, the log is printed at the defmt tab, but without color:

image

What's I expect: log with color in defmt tab

noppej commented 6 months ago

The extension runs probe-rs as a background process, and defmt-decoder (or maybe one of its dependencies) disables terminal sequences for color codding. I am sure this is a solve-able problem, but haven't figured out the solution yet.

In the mean time, you can manually run probe-rs as a server, and configure the extension to connect to it. When you do, you will see the color coding you expect.

noppej commented 6 months ago

@Tiwalun and/or @Yatekii ... My experience with Node is very limited, but I suspect it is this spawn option that is causing the behaviour with defmt.

Does that make sense to you? Any suggestions on how to mitigate?