import { SdapiClient } from './sdapi-client.js'; import type { BreakpointInput, DebugSessionCallbacks, DebugSessionConfig, SdapiBreakpoint, SdapiScriptThread } from './types.js'; export declare class DebugSessionManager { readonly client: SdapiClient; private readonly config; private readonly callbacks; private readonly logger; private pollTimer?; private keepaliveTimer?; /** Last known thread states keyed by thread id */ private knownThreads; private connected; constructor(config: DebugSessionConfig, callbacks?: DebugSessionCallbacks); /** * Connect to the debugger: enable the client, start polling and keepalive. */ connect(): Promise; /** * Disconnect: stop timers, delete client. */ disconnect(): Promise; /** * Set breakpoints (replaces all current breakpoints). */ setBreakpoints(breakpoints: BreakpointInput[]): Promise; /** * Resume a halted thread. */ resume(threadId: number): Promise; /** * Step over (next line). */ stepOver(threadId: number): Promise; /** * Step into function. */ stepInto(threadId: number): Promise; /** * Step out of function. */ stepOut(threadId: number): Promise; /** * Get the current list of known threads (from last poll). */ getKnownThreads(): SdapiScriptThread[]; /** * Returns the session cookie (`dwsid`) established with the debugger, or * `undefined` if not yet connected. This cookie pins requests to the app * server holding the debugger session; callers can use it to route an * external request (e.g. a storefront browser) to the same app server so * breakpoints are hit. */ getSessionCookie(name?: string): string | undefined; private stopTimers; private keepalive; private haltLocationChanged; private logThreadHalted; private pollThreads; }