import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { URI as uri } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model"; import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IExtensionHostDebugService } from "@codingame/monaco-vscode-api/vscode/vs/platform/debug/common/extensionHostDebug.service"; import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { INotificationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service"; import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service"; import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service"; import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service"; import { IWorkspaceTrustRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspaceTrust.service"; import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service"; import { IActivityService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service"; import { IWorkbenchLayoutService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService.service"; import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service"; import { IPaneCompositePartService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service"; import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service"; import { ITestService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/testing/common/testService.service"; import { IAdapterManager, IBreakpoint, IBreakpointData, IBreakpointUpdateData, IConfig, IConfigurationManager, IDebugModel, IDebugSession, IDebugSessionOptions, IEnablement, IExceptionBreakpoint, ILaunch, IStackFrame, IThread, IViewModel, State } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug"; import { IDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service"; import { IDataBreakpointOptions, IFunctionBreakpointOptions, IInstructionBreakpointOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debugModel"; export declare class DebugService implements IDebugService { private readonly editorService; private readonly paneCompositeService; private readonly viewsService; private readonly viewDescriptorService; private readonly notificationService; private readonly dialogService; private readonly layoutService; private readonly contextService; private readonly contextKeyService; private readonly lifecycleService; private readonly instantiationService; private readonly extensionService; private readonly fileService; private readonly configurationService; private readonly extensionHostDebugService; private readonly activityService; private readonly commandService; private readonly quickInputService; private readonly workspaceTrustRequestService; private readonly uriIdentityService; private readonly testService; readonly _serviceBrand: undefined; private readonly _onDidChangeState; private readonly _onDidNewSession; private readonly _onWillNewSession; private readonly _onDidEndSession; private readonly restartingSessions; private debugStorage; private model; private viewModel; private telemetry; private taskRunner; private configurationManager; private adapterManager; private readonly disposables; private debugType; private debugState; private inDebugMode; private debugUx; private hasDebugged; private breakpointsExist; private disassemblyViewFocus; private breakpointsToSendOnResourceSaved; private initializing; private _initializingOptions; private previousState; private sessionCancellationTokens; private activity; private chosenEnvironments; private haveDoneLazySetup; constructor(editorService: IEditorService, paneCompositeService: IPaneCompositePartService, viewsService: IViewsService, viewDescriptorService: IViewDescriptorService, notificationService: INotificationService, dialogService: IDialogService, layoutService: IWorkbenchLayoutService, contextService: IWorkspaceContextService, contextKeyService: IContextKeyService, lifecycleService: ILifecycleService, instantiationService: IInstantiationService, extensionService: IExtensionService, fileService: IFileService, configurationService: IConfigurationService, extensionHostDebugService: IExtensionHostDebugService, activityService: IActivityService, commandService: ICommandService, quickInputService: IQuickInputService, workspaceTrustRequestService: IWorkspaceTrustRequestService, uriIdentityService: IUriIdentityService, testService: ITestService); private initContextKeys; getModel(): IDebugModel; getViewModel(): IViewModel; getConfigurationManager(): IConfigurationManager; getAdapterManager(): IAdapterManager; sourceIsNotAvailable(uri: uri): void; dispose(): void; get state(): State; get initializingOptions(): IDebugSessionOptions | undefined; private startInitializingState; private endInitializingState; private cancelTokens; private onStateChange; get onDidChangeState(): Event; get onDidNewSession(): Event; get onWillNewSession(): Event; get onDidEndSession(): Event<{ session: IDebugSession; restart: boolean; }>; private lazySetup; /** * main entry point * properly manages compounds, checks for errors and handles the initializing state. */ startDebugging(launch: ILaunch | undefined, configOrName?: IConfig | string, options?: IDebugSessionOptions, saveBeforeStart?: boolean): Promise; /** * gets the debugger for the type, resolves configurations by providers, substitutes variables and runs prelaunch tasks */ private createSession; /** * instantiates the new session, initializes the session, registers session listeners and reports telemetry */ private doCreateSession; private confirmConcurrentSession; private launchOrAttachToSession; private registerSessionListeners; restartSession(session: IDebugSession, restartData?: any): Promise; stopSession(session: IDebugSession | undefined, disconnect?: boolean, suspend?: boolean): Promise; private substituteVariables; private showError; focusStackFrame(_stackFrame: IStackFrame | undefined, _thread?: IThread, _session?: IDebugSession, options?: { explicit?: boolean; preserveFocus?: boolean; sideBySide?: boolean; pinned?: boolean; }): Promise; addWatchExpression(name?: string): void; renameWatchExpression(id: string, newName: string): void; moveWatchExpression(id: string, position: number): void; removeWatchExpressions(id?: string): void; canSetBreakpointsIn(model: ITextModel): boolean; enableOrDisableBreakpoints(enable: boolean, breakpoint?: IEnablement): Promise; addBreakpoints(uri: uri, rawBreakpoints: IBreakpointData[], ariaAnnounce?: boolean): Promise; updateBreakpoints(uri: uri, data: Map, sendOnResourceSaved: boolean): Promise; removeBreakpoints(id?: string | string[]): Promise; setBreakpointsActivated(activated: boolean): Promise; addFunctionBreakpoint(opts?: IFunctionBreakpointOptions, id?: string): Promise; updateFunctionBreakpoint(id: string, update: { name?: string; hitCondition?: string; condition?: string; }): Promise; removeFunctionBreakpoints(id?: string): Promise; addDataBreakpoint(opts: IDataBreakpointOptions): Promise; updateDataBreakpoint(id: string, update: { hitCondition?: string; condition?: string; }): Promise; removeDataBreakpoints(id?: string): Promise; addInstructionBreakpoint(opts: IInstructionBreakpointOptions): Promise; removeInstructionBreakpoints(instructionReference?: string, offset?: number, address?: bigint): Promise; setExceptionBreakpointFallbackSession(sessionId: string): void; setExceptionBreakpointsForSession(session: IDebugSession, filters: DebugProtocol.ExceptionBreakpointsFilter[]): void; setExceptionBreakpointCondition(exceptionBreakpoint: IExceptionBreakpoint, condition: string | undefined): Promise; sendAllBreakpoints(session?: IDebugSession): Promise; /** * Removes the condition of triggered breakpoints that depended on * breakpoints in `removedBreakpoints`. Returns the URIs of resources that * had their breakpoints changed in this way. */ private unlinkTriggeredBreakpoints; private makeTriggeredBreakpointsMatchEnablement; sendBreakpoints(modelUri: uri, sourceModified?: boolean, session?: IDebugSession): Promise; private sendFunctionBreakpoints; private sendDataBreakpoints; private sendInstructionBreakpoints; private sendExceptionBreakpoints; private onFileChanges; runTo(uri: uri, lineNumber: number, column?: number): Promise; private addAndValidateBreakpoints; } export declare function getStackFrameThreadAndSessionToFocus(model: IDebugModel, stackFrame: IStackFrame | undefined, thread?: IThread, session?: IDebugSession, avoidSession?: IDebugSession): { stackFrame: IStackFrame | undefined; thread: IThread | undefined; session: IDebugSession | undefined; };