import { CommandService, Emitter, Event } from '@theia/core/lib/common'; import { LabelProvider, OpenerService, StorageService } from '@theia/core/lib/browser'; import URI from '@theia/core/lib/common/uri'; import { SourceBreakpoint, ExceptionBreakpoint, FunctionBreakpoint, BaseBreakpoint, InstructionBreakpoint, DataBreakpoint } from './breakpoint-marker'; import { DebugSourceBreakpoint } from '../model/debug-source-breakpoint'; import { DebugFunctionBreakpoint } from '../model/debug-function-breakpoint'; import { DebugInstructionBreakpoint } from '../model/debug-instruction-breakpoint'; import { DebugExceptionBreakpoint } from '../view/debug-exception-breakpoint'; import { DebugDataBreakpoint } from '../model/debug-data-breakpoint'; import { BPCapabilities, DebugBreakpoint, DebugBreakpointOptions } from '../model/debug-breakpoint'; import { DebugProtocol } from '@vscode/debugprotocol'; import { FileService } from '@theia/filesystem/lib/browser/file-service'; export interface BreakpointsChangeEvent { uri: URI; added: T[]; removed: T[]; changed: T[]; } export type SourceBreakpointsChangeEvent = BreakpointsChangeEvent; export type FunctionBreakpointsChangeEvent = BreakpointsChangeEvent; export type InstructionBreakpointsChangeEvent = BreakpointsChangeEvent; export type DataBreakpointsChangeEvent = BreakpointsChangeEvent; export declare class BreakpointManager { static EXCEPTION_URI: URI; static FUNCTION_URI: URI; static INSTRUCTION_URI: URI; static DATA_URI: URI; protected readonly sourceBreakpoints: Map; protected readonly storage: StorageService; protected readonly labelProvider: LabelProvider; protected readonly openerService: OpenerService; protected readonly commandService: CommandService; protected readonly fileService: FileService; protected readonly onDidChangeMarkersEmitter: Emitter; /** * Fires when any breakpoint type changes (source, function, instruction, data, or exception). * The URI identifies the affected resource or the synthetic URI for non-source breakpoint types * (e.g. {@link BreakpointManager.FUNCTION_URI}). */ get onDidChangeMarkers(): Event; protected fireOnDidChangeMarkers(uri: URI): void; protected readonly onDidChangeBreakpointsEmitter: Emitter; readonly onDidChangeBreakpoints: Event; protected readonly onDidChangeFunctionBreakpointsEmitter: Emitter; readonly onDidChangeFunctionBreakpoints: Event; protected readonly onDidChangeInstructionBreakpointsEmitter: Emitter; readonly onDidChangeInstructionBreakpoints: Event; protected readonly onDidChangeDataBreakpointsEmitter: Emitter; readonly onDidChangeDataBreakpoints: Event; protected _breakpointOptions: DebugBreakpointOptions | undefined; protected init(): void; getBreakpoints(uri?: URI): readonly DebugSourceBreakpoint[]; getUris(): IterableIterator; hasBreakpoints(): boolean; /** * Replace the source breakpoints for a URI. Incoming `breakpoints` are * plain `SourceBreakpoint` data; existing `DebugSourceBreakpoint` wrappers * are preserved by ID so that session data survives position changes. */ setBreakpoints(uri: URI, breakpoints: SourceBreakpoint[]): void; addBreakpoint(breakpoint: SourceBreakpoint): DebugSourceBreakpoint; removeBreakpoint(breakpoint: DebugSourceBreakpoint): void; /** * Diff `oldBps` → `newBps`, store, fire markers and typed events. * Both arrays must be for the same URI. */ protected applySourceBreakpoints(uri: URI, newBps: readonly DebugSourceBreakpoint[], oldBps: readonly DebugSourceBreakpoint[]): void; removeBreakpoints(): void; getLineBreakpoints(uri: URI, line: number): DebugSourceBreakpoint[]; getInlineBreakpoint(uri: URI, line: number, column: number): DebugSourceBreakpoint | undefined; getBreakpointById(id: string): DebugBreakpoint | undefined; allBreakpoints(): IterableIterator; updateSessionData(sessionId: string, sessionCapabilities: DebugProtocol.Capabilities, bps?: Map): void; protected toBpCapabilities(capabilities: DebugProtocol.Capabilities): BPCapabilities; protected toDebugSourceBreakpoint(source: SourceBreakpoint): DebugSourceBreakpoint; getBreakpointOptions(): DebugBreakpointOptions; protected _breakpointsEnabled: boolean; get breakpointsEnabled(): boolean; set breakpointsEnabled(breakpointsEnabled: boolean); enableAllBreakpoints(enabled: boolean): void; enableBreakpoint(breakpoint: T, enabled: boolean): void; protected doEnableBreakpoint(breakpoint: DebugBreakpoint, enabled: boolean): boolean; updateBreakpoint>(bp: T, update: Partial): void; fireBreakpointChanged(breakpoint: DebugBreakpoint): void; protected fireTypedBreakpointEvent(uri: URI, added: DebugBreakpoint[], changed: DebugBreakpoint[], removed: DebugBreakpoint[]): void; removeBreakpointsById(ids: string[]): void; protected exceptionBreakpoints: DebugExceptionBreakpoint[]; getExceptionBreakpoint(filter: DebugProtocol.ExceptionBreakpointsFilter): DebugExceptionBreakpoint | undefined; getExceptionBreakpoints(): readonly DebugExceptionBreakpoint[]; addExceptionBreakpoints(filters: DebugProtocol.ExceptionBreakpointsFilter[], sessionId: string): void; updateExceptionBreakpointVisibility(sessionId: string): void; clearExceptionSessionEnablement(sessionId: string): void; protected doUpdateExceptionBreakpointVisibility(sessionId: string): void; protected functionBreakpoints: DebugFunctionBreakpoint[]; getFunctionBreakpoints(): readonly DebugFunctionBreakpoint[]; setFunctionBreakpoints(functionBreakpoints: FunctionBreakpoint[]): void; addFunctionBreakpoint(bp: FunctionBreakpoint): void; updateFunctionBreakpoint(bp: DebugFunctionBreakpoint, update: Partial): void; removeFunctionBreakpoint(breakpoint: DebugFunctionBreakpoint): void; protected instructionBreakpoints: DebugInstructionBreakpoint[]; getInstructionBreakpoints(): ReadonlyArray; protected setInstructionBreakpoints(newBreakpoints: InstructionBreakpoint[]): void; addInstructionBreakpoint(address: string, offset: number, condition?: string, hitCondition?: string): void; removeInstructionBreakpoint(breakpoint: DebugInstructionBreakpoint): void; removeInstructionBreakpointAt(address: string): void; clearInstructionBreakpoints(): void; protected dataBreakpoints: DebugDataBreakpoint[]; getDataBreakpoints(): readonly DebugDataBreakpoint[]; setDataBreakpoints(breakpoints: DataBreakpoint[]): void; addDataBreakpoint(breakpoint: DataBreakpoint): void; updateDataBreakpoint(bp: DebugDataBreakpoint, options: { enabled?: boolean; raw?: Partial>; }): void; removeDataBreakpoint(bp: DebugDataBreakpoint): void; load(): Promise; save(): void; } export declare namespace BreakpointManager { interface Data { breakpointsEnabled: boolean; breakpoints: { [uri: string]: SourceBreakpoint[]; }; exceptionBreakpoints?: ExceptionBreakpoint[]; functionBreakpoints?: FunctionBreakpoint[]; instructionBreakpoints?: InstructionBreakpoint[]; dataBreakpoints?: DataBreakpoint[]; } } //# sourceMappingURL=breakpoint-manager.d.ts.map