microsoft / microsoft/debug-adapter-protocol

Support for executing debugger commands upon hitting a breakpoint

Open
#84 13 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

The DAP currently has support for three types of additions to breakpoints including conditions, hit count, and log messages.

interface SourceBreakpoint {
  line: number;
  column?: number;
  condition?: string;
  hitCondition?: string;
  logMessage?: string;
}

It would be nice if a user could attach commands to be automatically executed when a breakpoint is hit. This would be useful for some debuggers that have an extensive list of debugger commands that are more powerful than simply evaluating an expression such as GDB or LLDB.

The addition to SourceBreakpoint could be:

 /**
   * An optional list of commands that the backend will execute and log the output
   * (if any).
   */
  commands?: string[];

I know of at least 2 IDEs (IntelliJ and Xcode) that have support for executing any arbitrary debugger command(s) when a breakpoint is hit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DAP SourceBreakpoint definition and its existing condition, hitCondition, and logMessage fields. Review the 13-comment discussion for decisions about the commands field and output behavior; done requires an agreed protocol design that maintainers accept.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.