Skip to content

Commit

Permalink
debug: finalize debugFocus API (#212190)
Browse files Browse the repository at this point in the history
Closes #63943
  • Loading branch information
connor4312 authored May 7, 2024
1 parent c4653fa commit 6e009e0
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 71 deletions.
4 changes: 0 additions & 4 deletions src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1244,9 +1244,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return extHostDebugService.breakpoints;
},
get activeStackItem() {
if (!isProposedApiEnabled(extension, 'debugFocus')) {
return undefined;
}
return extHostDebugService.activeStackItem;
},
registerDebugVisualizationProvider(id, provider) {
Expand All @@ -1273,7 +1270,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return _asExtensionEvent(extHostDebugService.onDidChangeBreakpoints)(listener, thisArgs, disposables);
},
onDidChangeActiveStackItem(listener, thisArg?, disposables?) {
checkProposedApiEnabled(extension, 'debugFocus');
return _asExtensionEvent(extHostDebugService.onDidChangeActiveStackItem)(listener, thisArg, disposables);
},
registerDebugConfigurationProvider(debugType: string, provider: vscode.DebugConfigurationProvider, triggerKind?: vscode.DebugConfigurationProviderTriggerKind) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const allApiProposals = Object.freeze({
contribViewsWelcome: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts',
createFileSystemWatcher: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.createFileSystemWatcher.d.ts',
customEditorMove: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts',
debugFocus: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.debugFocus.d.ts',
debugVisualization: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.debugVisualization.d.ts',
defaultChatParticipant: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts',
diffCommand: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts',
Expand Down
57 changes: 57 additions & 0 deletions src/vscode-dts/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16195,6 +16195,50 @@ declare module 'vscode' {
Dynamic = 2
}

/**
* Represents a thread in a debug session.
*/
export class DebugThread {
/**
* Debug session for thread.
*/
readonly session: DebugSession;

/**
* ID of the associated thread in the debug protocol.
*/
readonly threadId: number;

/**
* @hidden
*/
private constructor(session: DebugSession, threadId: number);
}

/**
* Represents a stack frame in a debug session.
*/
export class DebugStackFrame {
/**
* Debug session for thread.
*/
readonly session: DebugSession;

/**
* ID of the associated thread in the debug protocol.
*/
readonly threadId: number;
/**
* ID of the stack frame in the debug protocol.
*/
readonly frameId: number;

/**
* @hidden
*/
private constructor(session: DebugSession, threadId: number, frameId: number);
}

/**
* Namespace for debug functionality.
*/
Expand Down Expand Up @@ -16245,6 +16289,19 @@ declare module 'vscode' {
*/
export const onDidChangeBreakpoints: Event<BreakpointsChangeEvent>;

/**
* The currently focused thread or stack frame, or `undefined` if no
* thread or stack is focused. A thread can be focused any time there is
* an active debug session, while a stack frame can only be focused when
* a session is paused and the call stack has been retrieved.
*/
export const activeStackItem: DebugThread | DebugStackFrame | undefined;

/**
* An event which fires when the {@link debug.activeStackItem} has changed.
*/
export const onDidChangeActiveStackItem: Event<DebugThread | DebugStackFrame | undefined>;

/**
* Register a {@link DebugConfigurationProvider debug configuration provider} for a specific debug type.
* The optional {@link DebugConfigurationProviderTriggerKind triggerKind} can be used to specify when the `provideDebugConfigurations` method of the provider is triggered.
Expand Down
66 changes: 0 additions & 66 deletions src/vscode-dts/vscode.proposed.debugFocus.d.ts

This file was deleted.

0 comments on commit 6e009e0

Please sign in to comment.