Skip to content

Forward LLDB debugger logs to an output pane #1104

Open
@tristanlabelle

Description

@tristanlabelle

Is your feature request related to a problem? Please describe.
The LLDB debugger is very unreliable/crashy (at least on Windows). In order to help with investigations, it would be useful to capture logs from LLDB.

Describe the solution you'd like
If LLDB offers any sort of logging mechanism, the DAP server should send it back to the client and the VS Code Swift extension should manage an output pane that displays it. The enablement and verbosity of it could be controlled by a setting if it is a concern.

Bonus points if we can have a pane that shows what lldb command-line commands are executed for IDE operations as a learning tool :)

Describe alternatives you've considered
Currently we can only debug the debugger. Or would there be a way to ask the DAP to save a log to a file?

Additional context
It seems like the VSCode API has limited ability to customize how the debug adapter is launched and stdout is already used for the DAP communication. I can think of two possible implementations:

  1. Create a named pipe and pass it as a command line argument to the DAP for it to configure LLDB to send logs there.
  2. Use custom DAP notifications to send LLDB logs.

(this is all assuming LLDB has some logging mechanism)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions