@salesforce/b2c-tooling-sdk / operations/debug / DebugSessionManager
Class: DebugSessionManager
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:89
Constructors
Constructor
new DebugSessionManager(
config,callbacks):DebugSessionManager
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:105
Parameters
config
callbacks
Returns
DebugSessionManager
Properties
client
readonlyclient:SdapiClient
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:90
Methods
addBreakpoints()
addBreakpoints(
breakpoints):Promise<SdapiBreakpoint[]>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:207
Add breakpoints to the current set; existing breakpoints at the same script and line are replaced.
Parameters
breakpoints
Returns
Promise<SdapiBreakpoint[]>
connect()
connect():
Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:120
Connect to the debugger: enable the client, start polling and keepalive.
Returns
Promise<void>
disconnect()
disconnect():
Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:174
Disconnect: stop timers, delete client.
Returns
Promise<void>
getBreakpoints()
getBreakpoints():
SdapiBreakpoint[]
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:225
Breakpoints set by the last setBreakpoints or addBreakpoints.
Returns
getKnownThreads()
getKnownThreads():
SdapiScriptThread[]
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:296
Get the current list of known threads (from last poll).
Returns
getSessionCookie()
getSessionCookie(
name):string|undefined
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:307
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.
Parameters
name
string = 'dwsid'
Returns
string | undefined
resume()
resume(
threadId):Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:268
Resume a halted thread.
Parameters
threadId
number
Returns
Promise<void>
setBreakpoints()
setBreakpoints(
breakpoints):Promise<SdapiBreakpoint[]>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:196
Set breakpoints (replaces all current breakpoints).
Parameters
breakpoints
Returns
Promise<SdapiBreakpoint[]>
stepInto()
stepInto(
threadId):Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:282
Step into function.
Parameters
threadId
number
Returns
Promise<void>
stepOut()
stepOut(
threadId):Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:289
Step out of function.
Parameters
threadId
number
Returns
Promise<void>
stepOver()
stepOver(
threadId):Promise<void>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:275
Step over (next line).
Parameters
threadId
number
Returns
Promise<void>
waitForHalt()
waitForHalt(
timeoutMs,signal?):Promise<SdapiScriptThread|null>
Defined in: packages/b2c-tooling-sdk/src/operations/debug/debug-session.ts:234
Wait for a thread to halt. Resolves at once with an already halted thread, otherwise with the next thread to halt, or null after timeoutMs. Rejects when the session is not connected or disconnects, the debugger is disabled, or signal aborts.
Parameters
timeoutMs
number
signal?
AbortSignal
Returns
Promise<SdapiScriptThread | null>