import * as Platform from '../../core/platform/platform.js'; import * as SDK from '../../core/sdk/sdk.js'; import * as Workspace from '../workspace/workspace.js'; import { DebuggerLanguagePluginManager } from './DebuggerLanguagePlugins.js'; import { LiveLocationWithPool, type LiveLocation, type LiveLocationPool } from './LiveLocation.js'; import { type ResourceMapping } from './ResourceMapping.js'; import { type ResourceScriptFile } from './ResourceScriptMapping.js'; export declare class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObserver { #private; readonly resourceMapping: ResourceMapping; pluginManager: DebuggerLanguagePluginManager | null; private constructor(); initPluginManagerForTest(): DebuggerLanguagePluginManager | null; static instance(opts?: { forceNew: boolean | null; resourceMapping: ResourceMapping | null; targetManager: SDK.TargetManager.TargetManager | null; }): DebuggerWorkspaceBinding; static removeInstance(): void; addSourceMapping(sourceMapping: DebuggerSourceMapping): void; removeSourceMapping(sourceMapping: DebuggerSourceMapping): void; private computeAutoStepRanges; modelAdded(debuggerModel: SDK.DebuggerModel.DebuggerModel): void; modelRemoved(debuggerModel: SDK.DebuggerModel.DebuggerModel): void; /** * The promise returned by this function is resolved once all *currently* * pending LiveLocations are processed. */ pendingLiveLocationChangesPromise(): Promise; private recordLiveLocationChange; updateLocations(script: SDK.Script.Script): Promise; createLiveLocation(rawLocation: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool): Promise; createStackTraceTopFrameLiveLocation(rawLocations: SDK.DebuggerModel.Location[], updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool): Promise; createCallFrameLiveLocation(location: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool): Promise; rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location): Promise; uiSourceCodeForSourceMapSourceURL(debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString, isContentScript: boolean): Workspace.UISourceCode.UISourceCode | null; uiSourceCodeForSourceMapSourceURLPromise(debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString, isContentScript: boolean): Promise; uiSourceCodeForDebuggerLanguagePluginSourceURLPromise(debuggerModel: SDK.DebuggerModel.DebuggerModel, url: Platform.DevToolsPath.UrlString): Promise; uiSourceCodeForScript(script: SDK.Script.Script): Workspace.UISourceCode.UISourceCode | null; waitForUISourceCodeAdded(url: Platform.DevToolsPath.UrlString, target: SDK.Target.Target): Promise; uiLocationToRawLocations(uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number, columnNumber?: number): Promise; uiLocationToRawLocationsForUnformattedJavaScript(uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number, columnNumber: number): SDK.DebuggerModel.Location[]; normalizeUILocation(uiLocation: Workspace.UISourceCode.UILocation): Promise; /** * Computes the set of lines in the {@link uiSourceCode} that map to scripts by either looking at * the debug info (if any) or checking for inline scripts within documents. If this set cannot be * computed or all the lines in the {@link uiSourceCode} correspond to lines in a script, `null` * is returned here. * * @param uiSourceCode the source entity. * @returns a set of known mapped lines for {@link uiSourceCode} or `null` if it's impossible to * determine the set or the {@link uiSourceCode} does not map to or include any scripts. */ getMappedLines(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise | null>; scriptFile(uiSourceCode: Workspace.UISourceCode.UISourceCode, debuggerModel: SDK.DebuggerModel.DebuggerModel): ResourceScriptFile | null; scriptsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Script.Script[]; supportsConditionalBreakpoints(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean; private globalObjectCleared; private reset; resetForTest(target: SDK.Target.Target): void; private registerCallFrameLiveLocation; removeLiveLocation(location: Location): void; private debuggerResumed; } export declare class Location extends LiveLocationWithPool { #private; readonly scriptId: string; readonly rawLocation: SDK.DebuggerModel.Location; constructor(scriptId: string, rawLocation: SDK.DebuggerModel.Location, binding: DebuggerWorkspaceBinding, updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool); uiLocation(): Promise; dispose(): void; isIgnoreListed(): Promise; } declare class StackTraceTopFrameLocation extends LiveLocationWithPool { #private; constructor(updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool); static createStackTraceTopFrameLocation(rawLocations: SDK.DebuggerModel.Location[], binding: DebuggerWorkspaceBinding, updateDelegate: (arg0: LiveLocation) => Promise, locationPool: LiveLocationPool): Promise; uiLocation(): Promise; isIgnoreListed(): Promise; dispose(): void; private scheduleUpdate; private updateLocation; } export interface DebuggerSourceMapping { rawLocationToUILocation(rawLocation: SDK.DebuggerModel.Location): Workspace.UISourceCode.UILocation | null; uiLocationToRawLocations(uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number, columnNumber?: number): SDK.DebuggerModel.Location[]; } export {};