Skip to content

PlatformIO unified debugger does not properly escape tool installation process into MI2 #4565

@elmot

Description

@elmot

[x] PlatformIO Core.

Configuration

Operating system: Win10

PlatformIO Version (platformio --version): 6.1.6

Description of problem

When pio debug --interface=gdb --interpreter=mi2 --iex "set mi-async on" is run and a required tool is not installed,
pio downloads and installs the tool, and reports the progress to debuggers stdout. Those messages are not properly escaped for MI2

Setting PLATFORMIO_DISABLE_PROGRESSBAR=true does not help.

Steps to Reproduce

  1. Create a project for STM Nucleo-L476 board and arduino framework (most probably any framework and any STM32 board will have same effect)
  2. ensure that ~/.platformio/packages/tool-openocd does not exist
  3. Run debugger as pio debug --interface=gdb --interpreter=mi2 --iex "set mi-async on"

Actual Results

Unescaped download reports are printed to stdout:

Tool Manager: Installing platformio/tool-openocd @ ~2.1100.0
Unpacking...
Tool Manager: tool-openocd@2.1100.211028 has been installed!

Expected Results

The message is either escaped according to MI2 format, or printed to stderr, or not printed at all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions