@@ -15,7 +15,7 @@ import { DebugSessionUUID, ExtHostDebugServiceShape, IBreakpointsDeltaDto, IThre
15
15
import { IExtHostEditorTabs } from 'vs/workbench/api/common/extHostEditorTabs' ;
16
16
import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService' ;
17
17
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService' ;
18
- import { Breakpoint , DataBreakpoint , DebugAdapterExecutable , DebugAdapterInlineImplementation , DebugAdapterNamedPipeServer , DebugAdapterServer , DebugConsoleMode , Disposable , FunctionBreakpoint , Location , Position , setBreakpointId , SourceBreakpoint , ThreadFocus , StackFrameFocus , ThemeIcon } from 'vs/workbench/api/common/extHostTypes' ;
18
+ import { Breakpoint , DataBreakpoint , DebugAdapterExecutable , DebugAdapterInlineImplementation , DebugAdapterNamedPipeServer , DebugAdapterServer , DebugConsoleMode , Disposable , FunctionBreakpoint , Location , Position , setBreakpointId , SourceBreakpoint , Thread , StackFrame , ThemeIcon } from 'vs/workbench/api/common/extHostTypes' ;
19
19
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace' ;
20
20
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter' ;
21
21
import { MainThreadDebugVisualization , IAdapterDescriptor , IConfig , IDebugAdapter , IDebugAdapterExecutable , IDebugAdapterNamedPipeServer , IDebugAdapterServer , IDebugVisualization , IDebugVisualizationContext , IDebuggerContribution , DebugVisualizationType , IDebugVisualizationTreeItem } from 'vs/workbench/contrib/debug/common/debug' ;
@@ -44,8 +44,8 @@ export interface IExtHostDebugService extends ExtHostDebugServiceShape {
44
44
onDidReceiveDebugSessionCustomEvent : Event < vscode . DebugSessionCustomEvent > ;
45
45
onDidChangeBreakpoints : Event < vscode . BreakpointsChangeEvent > ;
46
46
breakpoints : vscode . Breakpoint [ ] ;
47
- onDidChangeStackFrameFocus : Event < vscode . ThreadFocus | vscode . StackFrameFocus | undefined > ;
48
- stackFrameFocus : vscode . ThreadFocus | vscode . StackFrameFocus | undefined ;
47
+ onDidChangeActiveStackItem : Event < vscode . Thread | vscode . StackFrame | undefined > ;
48
+ activeStackItem : vscode . Thread | vscode . StackFrame | undefined ;
49
49
50
50
addBreakpoints ( breakpoints0 : readonly vscode . Breakpoint [ ] ) : Promise < void > ;
51
51
removeBreakpoints ( breakpoints0 : readonly vscode . Breakpoint [ ] ) : Promise < void > ;
@@ -97,8 +97,8 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
97
97
98
98
private readonly _onDidChangeBreakpoints : Emitter < vscode . BreakpointsChangeEvent > ;
99
99
100
- private _stackFrameFocus : vscode . ThreadFocus | vscode . StackFrameFocus | undefined ;
101
- private readonly _onDidChangeStackFrameFocus : Emitter < vscode . ThreadFocus | vscode . StackFrameFocus | undefined > ;
100
+ private _activeStackItem : vscode . Thread | vscode . StackFrame | undefined ;
101
+ private readonly _onDidChangeActiveStackItem : Emitter < vscode . Thread | vscode . StackFrame | undefined > ;
102
102
103
103
private _debugAdapters : Map < number , IDebugAdapter > ;
104
104
private _debugAdaptersTrackers : Map < number , vscode . DebugAdapterTracker > ;
@@ -144,7 +144,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
144
144
145
145
this . _onDidChangeBreakpoints = new Emitter < vscode . BreakpointsChangeEvent > ( ) ;
146
146
147
- this . _onDidChangeStackFrameFocus = new Emitter < vscode . ThreadFocus | vscode . StackFrameFocus | undefined > ( ) ;
147
+ this . _onDidChangeActiveStackItem = new Emitter < vscode . Thread | vscode . StackFrame | undefined > ( ) ;
148
148
149
149
this . _activeDebugConsole = new ExtHostDebugConsole ( this . _debugServiceProxy ) ;
150
150
@@ -278,12 +278,12 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
278
278
// extension debug API
279
279
280
280
281
- get stackFrameFocus ( ) : vscode . ThreadFocus | vscode . StackFrameFocus | undefined {
282
- return this . _stackFrameFocus ;
281
+ get activeStackItem ( ) : vscode . Thread | vscode . StackFrame | undefined {
282
+ return this . _activeStackItem ;
283
283
}
284
284
285
- get onDidChangeStackFrameFocus ( ) : Event < vscode . ThreadFocus | vscode . StackFrameFocus | undefined > {
286
- return this . _onDidChangeStackFrameFocus . event ;
285
+ get onDidChangeActiveStackItem ( ) : Event < vscode . Thread | vscode . StackFrame | undefined > {
286
+ return this . _onDidChangeActiveStackItem . event ;
287
287
}
288
288
289
289
get onDidChangeBreakpoints ( ) : Event < vscode . BreakpointsChangeEvent > {
@@ -768,21 +768,19 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
768
768
this . fireBreakpointChanges ( a , r , c ) ;
769
769
}
770
770
771
- public async $acceptStackFrameFocus ( focusDto : IThreadFocusDto | IStackFrameFocusDto ) : Promise < void > {
772
- let focus : ThreadFocus | StackFrameFocus ;
773
- const session = focusDto . sessionId ? await this . getSession ( focusDto . sessionId ) : undefined ;
774
- if ( ! session ) {
775
- throw new Error ( 'no DebugSession found for debug focus context' ) ;
776
- }
777
-
778
- if ( focusDto . kind === 'thread' ) {
779
- focus = new ThreadFocus ( session . api , focusDto . threadId ) ;
780
- } else {
781
- focus = new StackFrameFocus ( session . api , focusDto . threadId , focusDto . frameId ) ;
771
+ public async $acceptStackFrameFocus ( focusDto : IThreadFocusDto | IStackFrameFocusDto | undefined ) : Promise < void > {
772
+ let focus : vscode . Thread | vscode . StackFrame | undefined ;
773
+ if ( focusDto ) {
774
+ const session = await this . getSession ( focusDto . sessionId ) ;
775
+ if ( focusDto . kind === 'thread' ) {
776
+ focus = new Thread ( session . api , focusDto . threadId ) ;
777
+ } else {
778
+ focus = new StackFrame ( session . api , focusDto . threadId , focusDto . frameId ) ;
779
+ }
782
780
}
783
781
784
- this . _stackFrameFocus = < vscode . ThreadFocus | vscode . StackFrameFocus > focus ;
785
- this . _onDidChangeStackFrameFocus . fire ( this . _stackFrameFocus ) ;
782
+ this . _activeStackItem = focus ;
783
+ this . _onDidChangeActiveStackItem . fire ( this . _activeStackItem ) ;
786
784
}
787
785
788
786
public $provideDebugConfigurations ( configProviderHandle : number , folderUri : UriComponents | undefined , token : CancellationToken ) : Promise < vscode . DebugConfiguration [ ] > {
0 commit comments