Skip to content

Serial Monitor filters does not work with "solution" for colorized output #4556

@BOBAH1248

Description

@BOBAH1248

Many people love this wonderful tool, but sometimes they want more, especially since it is at least according to the documentation.

I found that it is based on miniterm part of serial.tools.
And then found that "solution" for colorize just write text as binary data:
https://github.com/pyserial/pyserial/blob/master/serial/tools/miniterm.py#L511-L517
So, colorization of output is done by OS terminal as expected.

Everything would be fine, but this solution also discards all filters! Include the best one esp32_exception_decoder.

Initially I faced this issue in PlatformIO IDE for VSCode under ESP32.
But research show that issue in platformio.exe device monitor, and in dependent 3th party submodule serial.tools.miniterm.

Configuration

Operating system:
Microsoft Windows 11 Pro
Version 10.0.22621 Build 22621

PlatformIO Version (platformio --version):
PlatformIO Core, version 6.1.6

Description of problem

The Serial Monitor filters are not work with "colorize solution":

monitor_filters = esp32_exception_decoder, direct, colorize
monitor_raw = yes   ; this is "colorize solution"

Steps to Reproduce

  1. Use ESP32/ESP8266 solution with enabled colorized output to uart, with throwing an "Guru meditation error" (like "assert", "abort" and so)
  2. When used platformio.ini with rows as in description, the colors works as expected, but Backtrace: from output is not parsed
  3. If comment monitor_raw in platformio.ini, the colors don't works, but Backtrace: works as expected

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions