devtools-protocol
Version:
The Chrome DevTools Protocol JSON
1,551 lines (1,435 loc) • 736 kB
TypeScript
// Copyright (c) 2026 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**********************************************************************
* Auto-generated by protocol-dts-generator.ts. Do not edit manually. *
**********************************************************************/
/**
* The Chrome DevTools Protocol.
* @public
*/
export namespace Protocol {
export type integer = number
/**
* This domain is deprecated - use Runtime or Log instead.
* @deprecated
*/
export namespace Console {
export const enum ConsoleMessageSource {
XML = 'xml',
Javascript = 'javascript',
Network = 'network',
ConsoleAPI = 'console-api',
Storage = 'storage',
Appcache = 'appcache',
Rendering = 'rendering',
Security = 'security',
Other = 'other',
Deprecation = 'deprecation',
Worker = 'worker',
}
export const enum ConsoleMessageLevel {
Log = 'log',
Warning = 'warning',
Error = 'error',
Debug = 'debug',
Info = 'info',
}
/**
* Console message.
*/
export interface ConsoleMessage {
/**
* Message source.
*/
source: ('xml' | 'javascript' | 'network' | 'console-api' | 'storage' | 'appcache' | 'rendering' | 'security' | 'other' | 'deprecation' | 'worker');
/**
* Message severity.
*/
level: ('log' | 'warning' | 'error' | 'debug' | 'info');
/**
* Message text.
*/
text: string;
/**
* URL of the message origin.
*/
url?: string;
/**
* Line number in the resource that generated this message (1-based).
*/
line?: integer;
/**
* Column number in the resource that generated this message (1-based).
*/
column?: integer;
}
/**
* Issued when new console message is added.
*/
export interface MessageAddedEvent {
/**
* Console message that has been added.
*/
message: ConsoleMessage;
}
}
/**
* Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
* breakpoints, stepping through execution, exploring stack traces, etc.
*/
export namespace Debugger {
/**
* Breakpoint identifier.
*/
export type BreakpointId = string;
/**
* Call frame identifier.
*/
export type CallFrameId = string;
/**
* Location in the source code.
*/
export interface Location {
/**
* Script identifier as reported in the `Debugger.scriptParsed`.
*/
scriptId: Runtime.ScriptId;
/**
* Line number in the script (0-based).
*/
lineNumber: integer;
/**
* Column number in the script (0-based).
*/
columnNumber?: integer;
}
/**
* Location in the source code.
* @experimental
*/
export interface ScriptPosition {
lineNumber: integer;
columnNumber: integer;
}
/**
* Location range within one script.
* @experimental
*/
export interface LocationRange {
scriptId: Runtime.ScriptId;
start: ScriptPosition;
end: ScriptPosition;
}
/**
* JavaScript call frame. Array of call frames form the call stack.
*/
export interface CallFrame {
/**
* Call frame identifier. This identifier is only valid while the virtual machine is paused.
*/
callFrameId: CallFrameId;
/**
* Name of the JavaScript function called on this call frame.
*/
functionName: string;
/**
* Location in the source code.
*/
functionLocation?: Location;
/**
* Location in the source code.
*/
location: Location;
/**
* JavaScript script name or url.
* Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
* sent `Debugger.scriptParsed` event.
* @deprecated
*/
url: string;
/**
* Scope chain for this call frame.
*/
scopeChain: Scope[];
/**
* `this` object for this call frame.
*/
this: Runtime.RemoteObject;
/**
* The value being returned, if the function is at return point.
*/
returnValue?: Runtime.RemoteObject;
/**
* Valid only while the VM is paused and indicates whether this frame
* can be restarted or not. Note that a `true` value here does not
* guarantee that Debugger#restartFrame with this CallFrameId will be
* successful, but it is very likely.
* @experimental
*/
canBeRestarted?: boolean;
}
export const enum ScopeType {
Global = 'global',
Local = 'local',
With = 'with',
Closure = 'closure',
Catch = 'catch',
Block = 'block',
Script = 'script',
Eval = 'eval',
Module = 'module',
WasmExpressionStack = 'wasm-expression-stack',
}
/**
* Scope description.
*/
export interface Scope {
/**
* Scope type.
*/
type: ('global' | 'local' | 'with' | 'closure' | 'catch' | 'block' | 'script' | 'eval' | 'module' | 'wasm-expression-stack');
/**
* Object representing the scope. For `global` and `with` scopes it represents the actual
* object; for the rest of the scopes, it is artificial transient object enumerating scope
* variables as its properties.
*/
object: Runtime.RemoteObject;
name?: string;
/**
* Location in the source code where scope starts
*/
startLocation?: Location;
/**
* Location in the source code where scope ends
*/
endLocation?: Location;
}
/**
* Search match for resource.
*/
export interface SearchMatch {
/**
* Line number in resource content.
*/
lineNumber: number;
/**
* Line with match content.
*/
lineContent: string;
}
export const enum BreakLocationType {
DebuggerStatement = 'debuggerStatement',
Call = 'call',
Return = 'return',
}
export interface BreakLocation {
/**
* Script identifier as reported in the `Debugger.scriptParsed`.
*/
scriptId: Runtime.ScriptId;
/**
* Line number in the script (0-based).
*/
lineNumber: integer;
/**
* Column number in the script (0-based).
*/
columnNumber?: integer;
type?: ('debuggerStatement' | 'call' | 'return');
}
/**
* @experimental
*/
export interface WasmDisassemblyChunk {
/**
* The next chunk of disassembled lines.
*/
lines: string[];
/**
* The bytecode offsets describing the start of each line.
*/
bytecodeOffsets: integer[];
}
/**
* Enum of possible script languages.
*/
export type ScriptLanguage = ('JavaScript' | 'WebAssembly');
export const enum DebugSymbolsType {
SourceMap = 'SourceMap',
EmbeddedDWARF = 'EmbeddedDWARF',
ExternalDWARF = 'ExternalDWARF',
}
/**
* Debug symbols available for a wasm script.
*/
export interface DebugSymbols {
/**
* Type of the debug symbols.
*/
type: ('SourceMap' | 'EmbeddedDWARF' | 'ExternalDWARF');
/**
* URL of the external symbol source.
*/
externalURL?: string;
}
export interface ResolvedBreakpoint {
/**
* Breakpoint unique identifier.
*/
breakpointId: BreakpointId;
/**
* Actual breakpoint location.
*/
location: Location;
}
export const enum ContinueToLocationRequestTargetCallFrames {
Any = 'any',
Current = 'current',
}
export interface ContinueToLocationRequest {
/**
* Location to continue to.
*/
location: Location;
targetCallFrames?: ('any' | 'current');
}
export interface EnableRequest {
/**
* The maximum size in bytes of collected scripts (not referenced by other heap objects)
* the debugger can hold. Puts no limit if parameter is omitted.
* @experimental
*/
maxScriptsCacheSize?: number;
}
export interface EnableResponse {
/**
* Unique identifier of the debugger.
* @experimental
*/
debuggerId: Runtime.UniqueDebuggerId;
}
export interface EvaluateOnCallFrameRequest {
/**
* Call frame identifier to evaluate on.
*/
callFrameId: CallFrameId;
/**
* Expression to evaluate.
*/
expression: string;
/**
* String object group name to put result into (allows rapid releasing resulting object handles
* using `releaseObjectGroup`).
*/
objectGroup?: string;
/**
* Specifies whether command line API should be available to the evaluated expression, defaults
* to false.
*/
includeCommandLineAPI?: boolean;
/**
* In silent mode exceptions thrown during evaluation are not reported and do not pause
* execution. Overrides `setPauseOnException` state.
*/
silent?: boolean;
/**
* Whether the result is expected to be a JSON object that should be sent by value.
*/
returnByValue?: boolean;
/**
* Whether preview should be generated for the result.
* @experimental
*/
generatePreview?: boolean;
/**
* Whether to throw an exception if side effect cannot be ruled out during evaluation.
*/
throwOnSideEffect?: boolean;
/**
* Terminate execution after timing out (number of milliseconds).
* @experimental
*/
timeout?: Runtime.TimeDelta;
/**
* Specifies the scope number to evaluate the expression in (default: 0, innermost scope).
* @experimental
*/
scopeNumber?: integer;
}
export interface EvaluateOnCallFrameResponse {
/**
* Object wrapper for the evaluation result.
*/
result: Runtime.RemoteObject;
/**
* Exception details.
*/
exceptionDetails?: Runtime.ExceptionDetails;
}
export interface GetPossibleBreakpointsRequest {
/**
* Start of range to search possible breakpoint locations in.
*/
start: Location;
/**
* End of range to search possible breakpoint locations in (excluding). When not specified, end
* of scripts is used as end of range.
*/
end?: Location;
/**
* Only consider locations which are in the same (non-nested) function as start.
*/
restrictToFunction?: boolean;
}
export interface GetPossibleBreakpointsResponse {
/**
* List of the possible breakpoint locations.
*/
locations: BreakLocation[];
}
export interface GetScriptSourceRequest {
/**
* Id of the script to get source for.
*/
scriptId: Runtime.ScriptId;
}
export interface GetScriptSourceResponse {
/**
* Script source (empty in case of Wasm bytecode).
*/
scriptSource: string;
/**
* Wasm bytecode. (Encoded as a base64 string when passed over JSON)
*/
bytecode?: string;
}
export interface DisassembleWasmModuleRequest {
/**
* Id of the script to disassemble
*/
scriptId: Runtime.ScriptId;
}
export interface DisassembleWasmModuleResponse {
/**
* For large modules, return a stream from which additional chunks of
* disassembly can be read successively.
*/
streamId?: string;
/**
* The total number of lines in the disassembly text.
*/
totalNumberOfLines: integer;
/**
* The offsets of all function bodies, in the format [start1, end1,
* start2, end2, ...] where all ends are exclusive.
*/
functionBodyOffsets: integer[];
/**
* The first chunk of disassembly.
*/
chunk: WasmDisassemblyChunk;
}
export interface NextWasmDisassemblyChunkRequest {
streamId: string;
}
export interface NextWasmDisassemblyChunkResponse {
/**
* The next chunk of disassembly.
*/
chunk: WasmDisassemblyChunk;
}
export interface GetWasmBytecodeRequest {
/**
* Id of the Wasm script to get source for.
*/
scriptId: Runtime.ScriptId;
}
export interface GetWasmBytecodeResponse {
/**
* Script source. (Encoded as a base64 string when passed over JSON)
*/
bytecode: string;
}
export interface GetStackTraceRequest {
stackTraceId: Runtime.StackTraceId;
}
export interface GetStackTraceResponse {
stackTrace: Runtime.StackTrace;
}
export interface PauseOnAsyncCallRequest {
/**
* Debugger will pause when async call with given stack trace is started.
*/
parentStackTraceId: Runtime.StackTraceId;
}
export interface RemoveBreakpointRequest {
breakpointId: BreakpointId;
}
export const enum RestartFrameRequestMode {
StepInto = 'StepInto',
}
export interface RestartFrameRequest {
/**
* Call frame identifier to evaluate on.
*/
callFrameId: CallFrameId;
/**
* The `mode` parameter must be present and set to 'StepInto', otherwise
* `restartFrame` will error out.
* @experimental
*/
mode?: ('StepInto');
}
export interface RestartFrameResponse {
/**
* New stack trace.
* @deprecated
*/
callFrames: CallFrame[];
/**
* Async stack trace, if any.
* @deprecated
*/
asyncStackTrace?: Runtime.StackTrace;
/**
* Async stack trace, if any.
* @deprecated
*/
asyncStackTraceId?: Runtime.StackTraceId;
}
export interface ResumeRequest {
/**
* Set to true to terminate execution upon resuming execution. In contrast
* to Runtime.terminateExecution, this will allows to execute further
* JavaScript (i.e. via evaluation) until execution of the paused code
* is actually resumed, at which point termination is triggered.
* If execution is currently not paused, this parameter has no effect.
*/
terminateOnResume?: boolean;
}
export interface SearchInContentRequest {
/**
* Id of the script to search in.
*/
scriptId: Runtime.ScriptId;
/**
* String to search for.
*/
query: string;
/**
* If true, search is case sensitive.
*/
caseSensitive?: boolean;
/**
* If true, treats string parameter as regex.
*/
isRegex?: boolean;
}
export interface SearchInContentResponse {
/**
* List of search matches.
*/
result: SearchMatch[];
}
export interface SetAsyncCallStackDepthRequest {
/**
* Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
* call stacks (default).
*/
maxDepth: integer;
}
export interface SetBlackboxExecutionContextsRequest {
/**
* Array of execution context unique ids for the debugger to ignore.
*/
uniqueIds: string[];
}
export interface SetBlackboxPatternsRequest {
/**
* Array of regexps that will be used to check script url for blackbox state.
*/
patterns: string[];
/**
* If true, also ignore scripts with no source url.
*/
skipAnonymous?: boolean;
}
export interface SetBlackboxedRangesRequest {
/**
* Id of the script.
*/
scriptId: Runtime.ScriptId;
positions: ScriptPosition[];
}
export interface SetBreakpointRequest {
/**
* Location to set breakpoint in.
*/
location: Location;
/**
* Expression to use as a breakpoint condition. When specified, debugger will only stop on the
* breakpoint if this expression evaluates to true.
*/
condition?: string;
}
export interface SetBreakpointResponse {
/**
* Id of the created breakpoint for further reference.
*/
breakpointId: BreakpointId;
/**
* Location this breakpoint resolved into.
*/
actualLocation: Location;
}
export const enum SetInstrumentationBreakpointRequestInstrumentation {
BeforeScriptExecution = 'beforeScriptExecution',
BeforeScriptWithSourceMapExecution = 'beforeScriptWithSourceMapExecution',
}
export interface SetInstrumentationBreakpointRequest {
/**
* Instrumentation name.
*/
instrumentation: ('beforeScriptExecution' | 'beforeScriptWithSourceMapExecution');
}
export interface SetInstrumentationBreakpointResponse {
/**
* Id of the created breakpoint for further reference.
*/
breakpointId: BreakpointId;
}
export interface SetBreakpointByUrlRequest {
/**
* Line number to set breakpoint at.
*/
lineNumber: integer;
/**
* URL of the resources to set breakpoint on.
*/
url?: string;
/**
* Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
* `urlRegex` must be specified.
*/
urlRegex?: string;
/**
* Script hash of the resources to set breakpoint on.
*/
scriptHash?: string;
/**
* Offset in the line to set breakpoint at.
*/
columnNumber?: integer;
/**
* Expression to use as a breakpoint condition. When specified, debugger will only stop on the
* breakpoint if this expression evaluates to true.
*/
condition?: string;
}
export interface SetBreakpointByUrlResponse {
/**
* Id of the created breakpoint for further reference.
*/
breakpointId: BreakpointId;
/**
* List of the locations this breakpoint resolved into upon addition.
*/
locations: Location[];
}
export interface SetBreakpointOnFunctionCallRequest {
/**
* Function object id.
*/
objectId: Runtime.RemoteObjectId;
/**
* Expression to use as a breakpoint condition. When specified, debugger will
* stop on the breakpoint if this expression evaluates to true.
*/
condition?: string;
}
export interface SetBreakpointOnFunctionCallResponse {
/**
* Id of the created breakpoint for further reference.
*/
breakpointId: BreakpointId;
}
export interface SetBreakpointsActiveRequest {
/**
* New value for breakpoints active state.
*/
active: boolean;
}
export const enum SetPauseOnExceptionsRequestState {
None = 'none',
Caught = 'caught',
Uncaught = 'uncaught',
All = 'all',
}
export interface SetPauseOnExceptionsRequest {
/**
* Pause on exceptions mode.
*/
state: ('none' | 'caught' | 'uncaught' | 'all');
}
export interface SetReturnValueRequest {
/**
* New return value.
*/
newValue: Runtime.CallArgument;
}
export const enum SetScriptSourceResponseStatus {
Ok = 'Ok',
CompileError = 'CompileError',
BlockedByActiveGenerator = 'BlockedByActiveGenerator',
BlockedByActiveFunction = 'BlockedByActiveFunction',
BlockedByTopLevelEsModuleChange = 'BlockedByTopLevelEsModuleChange',
}
export interface SetScriptSourceRequest {
/**
* Id of the script to edit.
*/
scriptId: Runtime.ScriptId;
/**
* New content of the script.
*/
scriptSource: string;
/**
* If true the change will not actually be applied. Dry run may be used to get result
* description without actually modifying the code.
*/
dryRun?: boolean;
/**
* If true, then `scriptSource` is allowed to change the function on top of the stack
* as long as the top-most stack frame is the only activation of that function.
* @experimental
*/
allowTopFrameEditing?: boolean;
}
export interface SetScriptSourceResponse {
/**
* New stack trace in case editing has happened while VM was stopped.
* @deprecated
*/
callFrames?: CallFrame[];
/**
* Whether current call stack was modified after applying the changes.
* @deprecated
*/
stackChanged?: boolean;
/**
* Async stack trace, if any.
* @deprecated
*/
asyncStackTrace?: Runtime.StackTrace;
/**
* Async stack trace, if any.
* @deprecated
*/
asyncStackTraceId?: Runtime.StackTraceId;
/**
* Whether the operation was successful or not. Only `Ok` denotes a
* successful live edit while the other enum variants denote why
* the live edit failed.
* @experimental
*/
status: ('Ok' | 'CompileError' | 'BlockedByActiveGenerator' | 'BlockedByActiveFunction' | 'BlockedByTopLevelEsModuleChange');
/**
* Exception details if any. Only present when `status` is `CompileError`.
*/
exceptionDetails?: Runtime.ExceptionDetails;
}
export interface SetSkipAllPausesRequest {
/**
* New value for skip pauses state.
*/
skip: boolean;
}
export interface SetVariableValueRequest {
/**
* 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
* scope types are allowed. Other scopes could be manipulated manually.
*/
scopeNumber: integer;
/**
* Variable name.
*/
variableName: string;
/**
* New variable value.
*/
newValue: Runtime.CallArgument;
/**
* Id of callframe that holds variable.
*/
callFrameId: CallFrameId;
}
export interface StepIntoRequest {
/**
* Debugger will pause on the execution of the first async task which was scheduled
* before next pause.
* @experimental
*/
breakOnAsyncCall?: boolean;
/**
* The skipList specifies location ranges that should be skipped on step into.
* @experimental
*/
skipList?: LocationRange[];
}
export interface StepOverRequest {
/**
* The skipList specifies location ranges that should be skipped on step over.
* @experimental
*/
skipList?: LocationRange[];
}
/**
* Fired when breakpoint is resolved to an actual script and location.
* Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event.
* @deprecated
*/
export interface BreakpointResolvedEvent {
/**
* Breakpoint unique identifier.
*/
breakpointId: BreakpointId;
/**
* Actual breakpoint location.
*/
location: Location;
}
export const enum PausedEventReason {
Ambiguous = 'ambiguous',
Assert = 'assert',
CSPViolation = 'CSPViolation',
DebugCommand = 'debugCommand',
DOM = 'DOM',
EventListener = 'EventListener',
Exception = 'exception',
Instrumentation = 'instrumentation',
OOM = 'OOM',
Other = 'other',
PromiseRejection = 'promiseRejection',
XHR = 'XHR',
Step = 'step',
}
/**
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
*/
export interface PausedEvent {
/**
* Call stack the virtual machine stopped on.
*/
callFrames: CallFrame[];
/**
* Pause reason.
*/
reason: ('ambiguous' | 'assert' | 'CSPViolation' | 'debugCommand' | 'DOM' | 'EventListener' | 'exception' | 'instrumentation' | 'OOM' | 'other' | 'promiseRejection' | 'XHR' | 'step');
/**
* Object containing break-specific auxiliary properties.
*/
data?: any;
/**
* Hit breakpoints IDs
*/
hitBreakpoints?: string[];
/**
* Async stack trace, if any.
*/
asyncStackTrace?: Runtime.StackTrace;
/**
* Async stack trace, if any.
* @experimental
*/
asyncStackTraceId?: Runtime.StackTraceId;
/**
* Never present, will be removed.
* @deprecated
* @experimental
*/
asyncCallStackTraceId?: Runtime.StackTraceId;
}
/**
* Fired when virtual machine fails to parse the script.
*/
export interface ScriptFailedToParseEvent {
/**
* Identifier of the script parsed.
*/
scriptId: Runtime.ScriptId;
/**
* URL or name of the script parsed (if any).
*/
url: string;
/**
* Line offset of the script within the resource with given URL (for script tags).
*/
startLine: integer;
/**
* Column offset of the script within the resource with given URL.
*/
startColumn: integer;
/**
* Last line of the script.
*/
endLine: integer;
/**
* Length of the last line of the script.
*/
endColumn: integer;
/**
* Specifies script creation context.
*/
executionContextId: Runtime.ExecutionContextId;
/**
* Content hash of the script, SHA-256.
*/
hash: string;
/**
* For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
*/
buildId: string;
/**
* Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
*/
executionContextAuxData?: any;
/**
* URL of source map associated with script (if any).
*/
sourceMapURL?: string;
/**
* True, if this script has sourceURL.
*/
hasSourceURL?: boolean;
/**
* True, if this script is ES6 module.
*/
isModule?: boolean;
/**
* This script length.
*/
length?: integer;
/**
* JavaScript top stack frame of where the script parsed event was triggered if available.
* @experimental
*/
stackTrace?: Runtime.StackTrace;
/**
* If the scriptLanguage is WebAssembly, the code section offset in the module.
* @experimental
*/
codeOffset?: integer;
/**
* The language of the script.
* @experimental
*/
scriptLanguage?: Debugger.ScriptLanguage;
/**
* The name the embedder supplied for this script.
* @experimental
*/
embedderName?: string;
}
/**
* Fired when virtual machine parses script. This event is also fired for all known and uncollected
* scripts upon enabling debugger.
*/
export interface ScriptParsedEvent {
/**
* Identifier of the script parsed.
*/
scriptId: Runtime.ScriptId;
/**
* URL or name of the script parsed (if any).
*/
url: string;
/**
* Line offset of the script within the resource with given URL (for script tags).
*/
startLine: integer;
/**
* Column offset of the script within the resource with given URL.
*/
startColumn: integer;
/**
* Last line of the script.
*/
endLine: integer;
/**
* Length of the last line of the script.
*/
endColumn: integer;
/**
* Specifies script creation context.
*/
executionContextId: Runtime.ExecutionContextId;
/**
* Content hash of the script, SHA-256.
*/
hash: string;
/**
* For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment.
*/
buildId: string;
/**
* Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
*/
executionContextAuxData?: any;
/**
* True, if this script is generated as a result of the live edit operation.
* @experimental
*/
isLiveEdit?: boolean;
/**
* URL of source map associated with script (if any).
*/
sourceMapURL?: string;
/**
* True, if this script has sourceURL.
*/
hasSourceURL?: boolean;
/**
* True, if this script is ES6 module.
*/
isModule?: boolean;
/**
* This script length.
*/
length?: integer;
/**
* JavaScript top stack frame of where the script parsed event was triggered if available.
* @experimental
*/
stackTrace?: Runtime.StackTrace;
/**
* If the scriptLanguage is WebAssembly, the code section offset in the module.
* @experimental
*/
codeOffset?: integer;
/**
* The language of the script.
* @experimental
*/
scriptLanguage?: Debugger.ScriptLanguage;
/**
* If the scriptLanguage is WebAssembly, the source of debug symbols for the module.
* @experimental
*/
debugSymbols?: Debugger.DebugSymbols[];
/**
* The name the embedder supplied for this script.
* @experimental
*/
embedderName?: string;
/**
* The list of set breakpoints in this script if calls to `setBreakpointByUrl`
* matches this script's URL or hash. Clients that use this list can ignore the
* `breakpointResolved` event. They are equivalent.
* @experimental
*/
resolvedBreakpoints?: ResolvedBreakpoint[];
}
}
/**
* @experimental
*/
export namespace HeapProfiler {
/**
* Heap snapshot object id.
*/
export type HeapSnapshotObjectId = string;
/**
* Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
*/
export interface SamplingHeapProfileNode {
/**
* Function location.
*/
callFrame: Runtime.CallFrame;
/**
* Allocations size in bytes for the node excluding children.
*/
selfSize: number;
/**
* Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
*/
id: integer;
/**
* Child nodes.
*/
children: SamplingHeapProfileNode[];
}
/**
* A single sample from a sampling profile.
*/
export interface SamplingHeapProfileSample {
/**
* Allocation size in bytes attributed to the sample.
*/
size: number;
/**
* Id of the corresponding profile tree node.
*/
nodeId: integer;
/**
* Time-ordered sample ordinal number. It is unique across all profiles retrieved
* between startSampling and stopSampling.
*/
ordinal: number;
}
/**
* Sampling profile.
*/
export interface SamplingHeapProfile {
head: SamplingHeapProfileNode;
samples: SamplingHeapProfileSample[];
}
export interface AddInspectedHeapObjectRequest {
/**
* Heap snapshot object id to be accessible by means of $x command line API.
*/
heapObjectId: HeapSnapshotObjectId;
}
export interface GetHeapObjectIdRequest {
/**
* Identifier of the object to get heap object id for.
*/
objectId: Runtime.RemoteObjectId;
}
export interface GetHeapObjectIdResponse {
/**
* Id of the heap snapshot object corresponding to the passed remote object id.
*/
heapSnapshotObjectId: HeapSnapshotObjectId;
}
export interface GetObjectByHeapObjectIdRequest {
objectId: HeapSnapshotObjectId;
/**
* Symbolic group name that can be used to release multiple objects.
*/
objectGroup?: string;
}
export interface GetObjectByHeapObjectIdResponse {
/**
* Evaluation result.
*/
result: Runtime.RemoteObject;
}
export interface GetSamplingProfileResponse {
/**
* Return the sampling profile being collected.
*/
profile: SamplingHeapProfile;
}
export interface StartSamplingRequest {
/**
* Average sample interval in bytes. Poisson distribution is used for the intervals. The
* default value is 32768 bytes.
*/
samplingInterval?: number;
/**
* Maximum stack depth. The default value is 128.
*/
stackDepth?: number;
/**
* By default, the sampling heap profiler reports only objects which are
* still alive when the profile is returned via getSamplingProfile or
* stopSampling, which is useful for determining what functions contribute
* the most to steady-state memory usage. This flag instructs the sampling
* heap profiler to also include information about objects discarded by
* major GC, which will show which functions cause large temporary memory
* usage or long GC pauses.
*/
includeObjectsCollectedByMajorGC?: boolean;
/**
* By default, the sampling heap profiler reports only objects which are
* still alive when the profile is returned via getSamplingProfile or
* stopSampling, which is useful for determining what functions contribute
* the most to steady-state memory usage. This flag instructs the sampling
* heap profiler to also include information about objects discarded by
* minor GC, which is useful when tuning a latency-sensitive application
* for minimal GC activity.
*/
includeObjectsCollectedByMinorGC?: boolean;
}
export interface StartTrackingHeapObjectsRequest {
trackAllocations?: boolean;
}
export interface StopSamplingResponse {
/**
* Recorded sampling heap profile.
*/
profile: SamplingHeapProfile;
}
export interface StopTrackingHeapObjectsRequest {
/**
* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
* when the tracking is stopped.
*/
reportProgress?: boolean;
/**
* Deprecated in favor of `exposeInternals`.
* @deprecated
*/
treatGlobalObjectsAsRoots?: boolean;
/**
* If true, numerical values are included in the snapshot
*/
captureNumericValue?: boolean;
/**
* If true, exposes internals of the snapshot.
* @experimental
*/
exposeInternals?: boolean;
}
export interface TakeHeapSnapshotRequest {
/**
* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
*/
reportProgress?: boolean;
/**
* If true, a raw snapshot without artificial roots will be generated.
* Deprecated in favor of `exposeInternals`.
* @deprecated
*/
treatGlobalObjectsAsRoots?: boolean;
/**
* If true, numerical values are included in the snapshot
*/
captureNumericValue?: boolean;
/**
* If true, exposes internals of the snapshot.
* @experimental
*/
exposeInternals?: boolean;
}
export interface AddHeapSnapshotChunkEvent {
chunk: string;
}
/**
* If heap objects tracking has been started then backend may send update for one or more fragments
*/
export interface HeapStatsUpdateEvent {
/**
* An array of triplets. Each triplet describes a fragment. The first integer is the fragment
* index, the second integer is a total count of objects for the fragment, the third integer is
* a total size of the objects for the fragment.
*/
statsUpdate: integer[];
}
/**
* If heap objects tracking has been started then backend regularly sends a current value for last
* seen object id and corresponding timestamp. If the were changes in the heap since last event
* then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
*/
export interface LastSeenObjectIdEvent {
lastSeenObjectId: integer;
timestamp: number;
}
export interface ReportHeapSnapshotProgressEvent {
done: integer;
total: integer;
finished?: boolean;
}
}
export namespace Profiler {
/**
* Profile node. Holds callsite information, execution statistics and child nodes.
*/
export interface ProfileNode {
/**
* Unique id of the node.
*/
id: integer;
/**
* Function location.
*/
callFrame: Runtime.CallFrame;
/**
* Number of samples where this node was on top of the call stack.
*/
hitCount?: integer;
/**
* Child node ids.
*/
children?: integer[];
/**
* The reason of being not optimized. The function may be deoptimized or marked as don't
* optimize.
*/
deoptReason?: string;
/**
* An array of source position ticks.
*/
positionTicks?: PositionTickInfo[];
}
/**
* Profile.
*/
export interface Profile {
/**
* The list of profile nodes. First item is the root node.
*/
nodes: ProfileNode[];
/**
* Profiling start timestamp in microseconds.
*/
startTime: number;
/**
* Profiling end timestamp in microseconds.
*/
endTime: number;
/**
* Ids of samples top nodes.
*/
samples?: integer[];
/**
* Time intervals between adjacent samples in microseconds. The first delta is relative to the
* profile startTime.
*/
timeDeltas?: integer[];
}
/**
* Specifies a number of samples attributed to a certain source position.
*/
export interface PositionTickInfo {
/**
* Source line number (1-based).
*/
line: integer;
/**
* Number of samples attributed to the source line.
*/
ticks: integer;
}
/**
* Coverage data for a source range.
*/
export interface CoverageRange {
/**
* JavaScript script source offset for the range start.
*/
startOffset: integer;
/**
* JavaScript script source offset for the range end.
*/
endOffset: integer;
/**
* Collected execution count of the source range.
*/
count: integer;
}
/**
* Coverage data for a JavaScript function.
*/
export interface FunctionCoverage {
/**
* JavaScript function name.
*/
functionName: string;
/**
* Source ranges inside the function with coverage data.
*/
ranges: CoverageRange[];
/**
* Whether coverage data for this function has block granularity.
*/
isBlockCoverage: boolean;
}
/**
* Coverage data for a JavaScript script.
*/
export interface ScriptCoverage {
/**
* JavaScript script id.
*/
scriptId: Runtime.ScriptId;
/**
* JavaScript script name or url.
*/
url: string;
/**
* Functions contained in the script that has coverage data.
*/
functions: FunctionCoverage[];
}
export interface GetBestEffortCoverageResponse {
/**
* Coverage data for the current isolate.
*/
result: ScriptCoverage[];
}
export interface SetSamplingIntervalRequest {
/**
* New sampling interval in microseconds.
*/
interval: integer;
}
export interface StartPreciseCoverageRequest {
/**
* Collect accurate call counts beyond simple 'covered' or 'not covered'.
*/
callCount?: boolean;
/**
* Collect block-based coverage.
*/
detailed?: boolean;
/**
* Allow the backend to send updates on its own initiative
*/
allowTriggeredUpdates?: boolean;
}
export interface StartPreciseCoverageResponse {
/**
* Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
*/
timestamp: number;
}
export interface StopResponse {
/**
* Recorded profile.
*/
profile: Profile;
}
export interface TakePreciseCoverageResponse {
/**
* Coverage data for the current isolate.
*/
result: ScriptCoverage[];
/**
* Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
*/
timestamp: number;
}
export interface ConsoleProfileFinishedEvent {
id: string;
/**
* Location of console.profileEnd().
*/
location: Debugger.Location;
profile: Profile;
/**
* Profile title passed as an argument to console.profile().
*/
title?: string;
}
/**
* Sent when new profile recording is started using console.profile() call.
*/
export interface ConsoleProfileStartedEvent {
id: string;
/**
* Location of console.profile().
*/
location: Debugger.Location;
/**
* Profile title passed as an argument to console.profile().
*/
title?: string;
}
/**
* Reports coverage delta since the last poll (either from an event like this, or from
* `takePreciseCoverage` for the current isolate. May only be sent if precise code
* coverage has been started. This event can be trigged by the embedder to, for example,
* trigger collection of coverage data immediately at a cert