Skip to content

DAP: decode ANSI colours in the debug console, and tell the debug adapter with supportsANSIStyling #2169

Done

Description

@lagergren

What

  • The capability: DAP has the client capability supportsANSIStyling in the initialize request. With it, the client says that it interprets ANSI escape sequences in the output it shows, such as colours and bold, so the adapter may send them.
  • LSP4IJ doesn't send it: its initialize request sends supportsInvalidatedEvent, supportsRunInTerminalRequest, supportsStartDebuggingRequest, supportsVariablePaging and supportsVariableType, but not this.
  • No decoding either: its debug console prints the output of output events as it comes, without decoding ANSI escape sequences. Nothing in the DAP console's path uses AnsiEscapeDecoder. So output that has them anyway, e.g. from a program that colours its logs, shows the raw escape codes.

Proposal

  • Decode: ANSI escape sequences in the output that the debug console prints, with IntelliJ's AnsiEscapeDecoder, as run consoles do.
  • Then advertise: send supportsANSIStyling: true.

LSP4J 1.0.0 has InitializeRequestArguments.setSupportsANSIStyling.

Activity

  1. added
    enhancement
    dap
    on Nov 23, 2026
  2. added this to the 0.30.2 milestone on Nov 24, 2026
  3. added a commit that references this issue on Nov 25, 2026
    c46480d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions