Skip to content

Debug API #28500

@isidorn

Description

@isidorn

We are looking into adding debug API to our vscode.d.ts. In order to design this as best as possible let's first look at the use cases and the current use of commands.

Use Cases

Commands

Extension --> VS Code

  • vscode.startDebug - extension can start a debug session by calling this command
  • customDebugRequest - extension can send any DAP request to the currently active debug adapter
  • debug.logToDebugConsole - extension can log a string to the debug console

VS Code --> Extension

  • startSessionCommand - if contributed vscode calls this command instead of starting a debug session on its own
  • initialConfigurations - if contributed vscode calls this command to get the initial content of the launch.json

Proposal

Minimal API proposal by @weinand and me. If name and type should be a part of DebugSession is very coraleted to the question @weinand raises below.

export namespace debug {
  export const onDidEndDebugSession: Event<DebugSession>;
}

export interface DebugSession {
   readonly name: string;
   readonly type: string;
   customRequest(requestName: string, args: any): Thenable<DebugRequestResult>;
}

Metadata

Metadata

Assignees

Labels

apidebugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions