Add debug API for call stack selection changes (63943) (#179132)

* feat: Initial pass at Debug Focus, listener for thread or stack frame
selection (#63943)

Add debug.onDidChangeDebugFocus. May provide ids for session, thread,
and stackFrame, as appropriate.

Fixes: #63943 api should provide thread/stack frame id (paraphrasing)

* chore: small comment tweaks in proposal

* fix: bad copy/paste in proposed. moved types out of 'debug' namespace

* fix: separate 'debugFocus' into thread and stackFrame specific
listeners, and create separate contexts for each

* fix: Revert prev change, switch to single api with union type

This reverts commit c308bc3a90.

* fix: rename accessor from 'focus' to 'stackFrameFocus'

* fix: review comments; remove unused type, imrpove comments

* fixL review comments, type change:  sessionID property cannot be undefined

* Remove comments

---------

Co-authored-by: Rob Lourens <roblourens@gmail.com>
This commit is contained in:
Michael Blout
2023-04-17 14:42:53 -04:00
committed by GitHub
parent d3d397c7e6
commit 2de3b04eaf
8 changed files with 160 additions and 6 deletions

View File

@@ -1105,6 +1105,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
get breakpoints() {
return extHostDebugService.breakpoints;
},
get stackFrameFocus() {
return extHostDebugService.stackFrameFocus;
},
onDidStartDebugSession(listener, thisArg?, disposables?) {
return extHostDebugService.onDidStartDebugSession(listener, thisArg, disposables);
},
@@ -1120,6 +1123,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
onDidChangeBreakpoints(listener, thisArgs?, disposables?) {
return extHostDebugService.onDidChangeBreakpoints(listener, thisArgs, disposables);
},
onDidChangeStackFrameFocus(listener, thisArg?, disposables?) {
return extHostDebugService.onDidChangeStackFrameFocus(listener, thisArg, disposables);
},
registerDebugConfigurationProvider(debugType: string, provider: vscode.DebugConfigurationProvider, triggerKind?: vscode.DebugConfigurationProviderTriggerKind) {
return extHostDebugService.registerDebugConfigurationProvider(debugType, provider, triggerKind || DebugConfigurationProviderTriggerKind.Initial);
},