vendor/github.com/go-rod/rod/lib/proto/debugger.go

1256 lines · 47183 bytes

   1// This file is generated by "./lib/proto/generate"
   2
   3package proto
   4
   5import (
   6	"github.com/ysmood/gson"
   7)
   8
   9/*
  10
  11Debugger
  12
  13Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
  14breakpoints, stepping through execution, exploring stack traces, etc.
  15
  16*/
  17
  18// DebuggerBreakpointID Breakpoint identifier.
  19type DebuggerBreakpointID string
  20
  21// DebuggerCallFrameID Call frame identifier.
  22type DebuggerCallFrameID string
  23
  24// DebuggerLocation Location in the source code.
  25type DebuggerLocation struct {
  26	// ScriptID Script identifier as reported in the `Debugger.scriptParsed`.
  27	ScriptID RuntimeScriptID `json:"scriptId"`
  28
  29	// LineNumber Line number in the script (0-based).
  30	LineNumber int `json:"lineNumber"`
  31
  32	// ColumnNumber (optional) Column number in the script (0-based).
  33	ColumnNumber *int `json:"columnNumber,omitempty"`
  34}
  35
  36// DebuggerScriptPosition (experimental) Location in the source code.
  37type DebuggerScriptPosition struct {
  38	// LineNumber ...
  39	LineNumber int `json:"lineNumber"`
  40
  41	// ColumnNumber ...
  42	ColumnNumber int `json:"columnNumber"`
  43}
  44
  45// DebuggerLocationRange (experimental) Location range within one script.
  46type DebuggerLocationRange struct {
  47	// ScriptID ...
  48	ScriptID RuntimeScriptID `json:"scriptId"`
  49
  50	// Start ...
  51	Start *DebuggerScriptPosition `json:"start"`
  52
  53	// End ...
  54	End *DebuggerScriptPosition `json:"end"`
  55}
  56
  57// DebuggerCallFrame JavaScript call frame. Array of call frames form the call stack.
  58type DebuggerCallFrame struct {
  59	// CallFrameID Call frame identifier. This identifier is only valid while the virtual machine is paused.
  60	CallFrameID DebuggerCallFrameID `json:"callFrameId"`
  61
  62	// FunctionName Name of the JavaScript function called on this call frame.
  63	FunctionName string `json:"functionName"`
  64
  65	// FunctionLocation (optional) Location in the source code.
  66	FunctionLocation *DebuggerLocation `json:"functionLocation,omitempty"`
  67
  68	// Location in the source code.
  69	Location *DebuggerLocation `json:"location"`
  70
  71	// URL (deprecated) JavaScript script name or url.
  72	// Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
  73	// sent `Debugger.scriptParsed` event.
  74	URL string `json:"url"`
  75
  76	// ScopeChain Scope chain for this call frame.
  77	ScopeChain []*DebuggerScope `json:"scopeChain"`
  78
  79	// This `this` object for this call frame.
  80	This *RuntimeRemoteObject `json:"this"`
  81
  82	// ReturnValue (optional) The value being returned, if the function is at return point.
  83	ReturnValue *RuntimeRemoteObject `json:"returnValue,omitempty"`
  84
  85	// CanBeRestarted (experimental) (optional) Valid only while the VM is paused and indicates whether this frame
  86	// can be restarted or not. Note that a `true` value here does not
  87	// guarantee that Debugger#restartFrame with this CallFrameId will be
  88	// successful, but it is very likely.
  89	CanBeRestarted bool `json:"canBeRestarted,omitempty"`
  90}
  91
  92// DebuggerScopeType enum.
  93type DebuggerScopeType string
  94
  95const (
  96	// DebuggerScopeTypeGlobal enum const.
  97	DebuggerScopeTypeGlobal DebuggerScopeType = "global"
  98
  99	// DebuggerScopeTypeLocal enum const.
 100	DebuggerScopeTypeLocal DebuggerScopeType = "local"
 101
 102	// DebuggerScopeTypeWith enum const.
 103	DebuggerScopeTypeWith DebuggerScopeType = "with"
 104
 105	// DebuggerScopeTypeClosure enum const.
 106	DebuggerScopeTypeClosure DebuggerScopeType = "closure"
 107
 108	// DebuggerScopeTypeCatch enum const.
 109	DebuggerScopeTypeCatch DebuggerScopeType = "catch"
 110
 111	// DebuggerScopeTypeBlock enum const.
 112	DebuggerScopeTypeBlock DebuggerScopeType = "block"
 113
 114	// DebuggerScopeTypeScript enum const.
 115	DebuggerScopeTypeScript DebuggerScopeType = "script"
 116
 117	// DebuggerScopeTypeEval enum const.
 118	DebuggerScopeTypeEval DebuggerScopeType = "eval"
 119
 120	// DebuggerScopeTypeModule enum const.
 121	DebuggerScopeTypeModule DebuggerScopeType = "module"
 122
 123	// DebuggerScopeTypeWasmExpressionStack enum const.
 124	DebuggerScopeTypeWasmExpressionStack DebuggerScopeType = "wasm-expression-stack"
 125)
 126
 127// DebuggerScope Scope description.
 128type DebuggerScope struct {
 129	// Type Scope type.
 130	Type DebuggerScopeType `json:"type"`
 131
 132	// Object representing the scope. For `global` and `with` scopes it represents the actual
 133	// object; for the rest of the scopes, it is artificial transient object enumerating scope
 134	// variables as its properties.
 135	Object *RuntimeRemoteObject `json:"object"`
 136
 137	// Name (optional) ...
 138	Name string `json:"name,omitempty"`
 139
 140	// StartLocation (optional) Location in the source code where scope starts
 141	StartLocation *DebuggerLocation `json:"startLocation,omitempty"`
 142
 143	// EndLocation (optional) Location in the source code where scope ends
 144	EndLocation *DebuggerLocation `json:"endLocation,omitempty"`
 145}
 146
 147// DebuggerSearchMatch Search match for resource.
 148type DebuggerSearchMatch struct {
 149	// LineNumber Line number in resource content.
 150	LineNumber float64 `json:"lineNumber"`
 151
 152	// LineContent Line with match content.
 153	LineContent string `json:"lineContent"`
 154}
 155
 156// DebuggerBreakLocationType enum.
 157type DebuggerBreakLocationType string
 158
 159const (
 160	// DebuggerBreakLocationTypeDebuggerStatement enum const.
 161	DebuggerBreakLocationTypeDebuggerStatement DebuggerBreakLocationType = "debuggerStatement"
 162
 163	// DebuggerBreakLocationTypeCall enum const.
 164	DebuggerBreakLocationTypeCall DebuggerBreakLocationType = "call"
 165
 166	// DebuggerBreakLocationTypeReturn enum const.
 167	DebuggerBreakLocationTypeReturn DebuggerBreakLocationType = "return"
 168)
 169
 170// DebuggerBreakLocation ...
 171type DebuggerBreakLocation struct {
 172	// ScriptID Script identifier as reported in the `Debugger.scriptParsed`.
 173	ScriptID RuntimeScriptID `json:"scriptId"`
 174
 175	// LineNumber Line number in the script (0-based).
 176	LineNumber int `json:"lineNumber"`
 177
 178	// ColumnNumber (optional) Column number in the script (0-based).
 179	ColumnNumber *int `json:"columnNumber,omitempty"`
 180
 181	// Type (optional) ...
 182	Type DebuggerBreakLocationType `json:"type,omitempty"`
 183}
 184
 185// DebuggerWasmDisassemblyChunk (experimental) ...
 186type DebuggerWasmDisassemblyChunk struct {
 187	// Lines The next chunk of disassembled lines.
 188	Lines []string `json:"lines"`
 189
 190	// BytecodeOffsets The bytecode offsets describing the start of each line.
 191	BytecodeOffsets []int `json:"bytecodeOffsets"`
 192}
 193
 194// DebuggerScriptLanguage Enum of possible script languages.
 195type DebuggerScriptLanguage string
 196
 197const (
 198	// DebuggerScriptLanguageJavaScript enum const.
 199	DebuggerScriptLanguageJavaScript DebuggerScriptLanguage = "JavaScript"
 200
 201	// DebuggerScriptLanguageWebAssembly enum const.
 202	DebuggerScriptLanguageWebAssembly DebuggerScriptLanguage = "WebAssembly"
 203)
 204
 205// DebuggerDebugSymbolsType enum.
 206type DebuggerDebugSymbolsType string
 207
 208const (
 209	// DebuggerDebugSymbolsTypeNone enum const.
 210	DebuggerDebugSymbolsTypeNone DebuggerDebugSymbolsType = "None"
 211
 212	// DebuggerDebugSymbolsTypeSourceMap enum const.
 213	DebuggerDebugSymbolsTypeSourceMap DebuggerDebugSymbolsType = "SourceMap"
 214
 215	// DebuggerDebugSymbolsTypeEmbeddedDWARF enum const.
 216	DebuggerDebugSymbolsTypeEmbeddedDWARF DebuggerDebugSymbolsType = "EmbeddedDWARF"
 217
 218	// DebuggerDebugSymbolsTypeExternalDWARF enum const.
 219	DebuggerDebugSymbolsTypeExternalDWARF DebuggerDebugSymbolsType = "ExternalDWARF"
 220)
 221
 222// DebuggerDebugSymbols Debug symbols available for a wasm script.
 223type DebuggerDebugSymbols struct {
 224	// Type of the debug symbols.
 225	Type DebuggerDebugSymbolsType `json:"type"`
 226
 227	// ExternalURL (optional) URL of the external symbol source.
 228	ExternalURL string `json:"externalURL,omitempty"`
 229}
 230
 231// DebuggerContinueToLocationTargetCallFrames enum.
 232type DebuggerContinueToLocationTargetCallFrames string
 233
 234const (
 235	// DebuggerContinueToLocationTargetCallFramesAny enum const.
 236	DebuggerContinueToLocationTargetCallFramesAny DebuggerContinueToLocationTargetCallFrames = "any"
 237
 238	// DebuggerContinueToLocationTargetCallFramesCurrent enum const.
 239	DebuggerContinueToLocationTargetCallFramesCurrent DebuggerContinueToLocationTargetCallFrames = "current"
 240)
 241
 242// DebuggerContinueToLocation Continues execution until specific location is reached.
 243type DebuggerContinueToLocation struct {
 244	// Location to continue to.
 245	Location *DebuggerLocation `json:"location"`
 246
 247	// TargetCallFrames (optional) ...
 248	TargetCallFrames DebuggerContinueToLocationTargetCallFrames `json:"targetCallFrames,omitempty"`
 249}
 250
 251// ProtoReq name.
 252func (m DebuggerContinueToLocation) ProtoReq() string { return "Debugger.continueToLocation" }
 253
 254// Call sends the request.
 255func (m DebuggerContinueToLocation) Call(c Client) error {
 256	return call(m.ProtoReq(), m, nil, c)
 257}
 258
 259// DebuggerDisable Disables debugger for given page.
 260type DebuggerDisable struct{}
 261
 262// ProtoReq name.
 263func (m DebuggerDisable) ProtoReq() string { return "Debugger.disable" }
 264
 265// Call sends the request.
 266func (m DebuggerDisable) Call(c Client) error {
 267	return call(m.ProtoReq(), m, nil, c)
 268}
 269
 270// DebuggerEnable Enables debugger for the given page. Clients should not assume that the debugging has been
 271// enabled until the result for this command is received.
 272type DebuggerEnable struct {
 273	// MaxScriptsCacheSize (experimental) (optional) The maximum size in bytes of collected scripts (not referenced by other heap objects)
 274	// the debugger can hold. Puts no limit if parameter is omitted.
 275	MaxScriptsCacheSize *float64 `json:"maxScriptsCacheSize,omitempty"`
 276}
 277
 278// ProtoReq name.
 279func (m DebuggerEnable) ProtoReq() string { return "Debugger.enable" }
 280
 281// Call the request.
 282func (m DebuggerEnable) Call(c Client) (*DebuggerEnableResult, error) {
 283	var res DebuggerEnableResult
 284	return &res, call(m.ProtoReq(), m, &res, c)
 285}
 286
 287// DebuggerEnableResult ...
 288type DebuggerEnableResult struct {
 289	// DebuggerID (experimental) Unique identifier of the debugger.
 290	DebuggerID RuntimeUniqueDebuggerID `json:"debuggerId"`
 291}
 292
 293// DebuggerEvaluateOnCallFrame Evaluates expression on a given call frame.
 294type DebuggerEvaluateOnCallFrame struct {
 295	// CallFrameID Call frame identifier to evaluate on.
 296	CallFrameID DebuggerCallFrameID `json:"callFrameId"`
 297
 298	// Expression to evaluate.
 299	Expression string `json:"expression"`
 300
 301	// ObjectGroup (optional) String object group name to put result into (allows rapid releasing resulting object handles
 302	// using `releaseObjectGroup`).
 303	ObjectGroup string `json:"objectGroup,omitempty"`
 304
 305	// IncludeCommandLineAPI (optional) Specifies whether command line API should be available to the evaluated expression, defaults
 306	// to false.
 307	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
 308
 309	// Silent (optional) In silent mode exceptions thrown during evaluation are not reported and do not pause
 310	// execution. Overrides `setPauseOnException` state.
 311	Silent bool `json:"silent,omitempty"`
 312
 313	// ReturnByValue (optional) Whether the result is expected to be a JSON object that should be sent by value.
 314	ReturnByValue bool `json:"returnByValue,omitempty"`
 315
 316	// GeneratePreview (experimental) (optional) Whether preview should be generated for the result.
 317	GeneratePreview bool `json:"generatePreview,omitempty"`
 318
 319	// ThrowOnSideEffect (optional) Whether to throw an exception if side effect cannot be ruled out during evaluation.
 320	ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"`
 321
 322	// Timeout (experimental) (optional) Terminate execution after timing out (number of milliseconds).
 323	Timeout RuntimeTimeDelta `json:"timeout,omitempty"`
 324}
 325
 326// ProtoReq name.
 327func (m DebuggerEvaluateOnCallFrame) ProtoReq() string { return "Debugger.evaluateOnCallFrame" }
 328
 329// Call the request.
 330func (m DebuggerEvaluateOnCallFrame) Call(c Client) (*DebuggerEvaluateOnCallFrameResult, error) {
 331	var res DebuggerEvaluateOnCallFrameResult
 332	return &res, call(m.ProtoReq(), m, &res, c)
 333}
 334
 335// DebuggerEvaluateOnCallFrameResult ...
 336type DebuggerEvaluateOnCallFrameResult struct {
 337	// Result Object wrapper for the evaluation result.
 338	Result *RuntimeRemoteObject `json:"result"`
 339
 340	// ExceptionDetails (optional) Exception details.
 341	ExceptionDetails *RuntimeExceptionDetails `json:"exceptionDetails,omitempty"`
 342}
 343
 344// DebuggerGetPossibleBreakpoints Returns possible locations for breakpoint. scriptId in start and end range locations should be
 345// the same.
 346type DebuggerGetPossibleBreakpoints struct {
 347	// Start of range to search possible breakpoint locations in.
 348	Start *DebuggerLocation `json:"start"`
 349
 350	// End (optional) End of range to search possible breakpoint locations in (excluding). When not specified, end
 351	// of scripts is used as end of range.
 352	End *DebuggerLocation `json:"end,omitempty"`
 353
 354	// RestrictToFunction (optional) Only consider locations which are in the same (non-nested) function as start.
 355	RestrictToFunction bool `json:"restrictToFunction,omitempty"`
 356}
 357
 358// ProtoReq name.
 359func (m DebuggerGetPossibleBreakpoints) ProtoReq() string { return "Debugger.getPossibleBreakpoints" }
 360
 361// Call the request.
 362func (m DebuggerGetPossibleBreakpoints) Call(c Client) (*DebuggerGetPossibleBreakpointsResult, error) {
 363	var res DebuggerGetPossibleBreakpointsResult
 364	return &res, call(m.ProtoReq(), m, &res, c)
 365}
 366
 367// DebuggerGetPossibleBreakpointsResult ...
 368type DebuggerGetPossibleBreakpointsResult struct {
 369	// Locations List of the possible breakpoint locations.
 370	Locations []*DebuggerBreakLocation `json:"locations"`
 371}
 372
 373// DebuggerGetScriptSource Returns source for the script with given id.
 374type DebuggerGetScriptSource struct {
 375	// ScriptID Id of the script to get source for.
 376	ScriptID RuntimeScriptID `json:"scriptId"`
 377}
 378
 379// ProtoReq name.
 380func (m DebuggerGetScriptSource) ProtoReq() string { return "Debugger.getScriptSource" }
 381
 382// Call the request.
 383func (m DebuggerGetScriptSource) Call(c Client) (*DebuggerGetScriptSourceResult, error) {
 384	var res DebuggerGetScriptSourceResult
 385	return &res, call(m.ProtoReq(), m, &res, c)
 386}
 387
 388// DebuggerGetScriptSourceResult ...
 389type DebuggerGetScriptSourceResult struct {
 390	// ScriptSource Script source (empty in case of Wasm bytecode).
 391	ScriptSource string `json:"scriptSource"`
 392
 393	// Bytecode (optional) Wasm bytecode.
 394	Bytecode []byte `json:"bytecode,omitempty"`
 395}
 396
 397// DebuggerDisassembleWasmModule (experimental) ...
 398type DebuggerDisassembleWasmModule struct {
 399	// ScriptID Id of the script to disassemble
 400	ScriptID RuntimeScriptID `json:"scriptId"`
 401}
 402
 403// ProtoReq name.
 404func (m DebuggerDisassembleWasmModule) ProtoReq() string { return "Debugger.disassembleWasmModule" }
 405
 406// Call the request.
 407func (m DebuggerDisassembleWasmModule) Call(c Client) (*DebuggerDisassembleWasmModuleResult, error) {
 408	var res DebuggerDisassembleWasmModuleResult
 409	return &res, call(m.ProtoReq(), m, &res, c)
 410}
 411
 412// DebuggerDisassembleWasmModuleResult (experimental) ...
 413type DebuggerDisassembleWasmModuleResult struct {
 414	// StreamID (optional) For large modules, return a stream from which additional chunks of
 415	// disassembly can be read successively.
 416	StreamID string `json:"streamId,omitempty"`
 417
 418	// TotalNumberOfLines The total number of lines in the disassembly text.
 419	TotalNumberOfLines int `json:"totalNumberOfLines"`
 420
 421	// FunctionBodyOffsets The offsets of all function bodies, in the format [start1, end1,
 422	// start2, end2, ...] where all ends are exclusive.
 423	FunctionBodyOffsets []int `json:"functionBodyOffsets"`
 424
 425	// Chunk The first chunk of disassembly.
 426	Chunk *DebuggerWasmDisassemblyChunk `json:"chunk"`
 427}
 428
 429// DebuggerNextWasmDisassemblyChunk (experimental) Disassemble the next chunk of lines for the module corresponding to the
 430// stream. If disassembly is complete, this API will invalidate the streamId
 431// and return an empty chunk. Any subsequent calls for the now invalid stream
 432// will return errors.
 433type DebuggerNextWasmDisassemblyChunk struct {
 434	// StreamID ...
 435	StreamID string `json:"streamId"`
 436}
 437
 438// ProtoReq name.
 439func (m DebuggerNextWasmDisassemblyChunk) ProtoReq() string {
 440	return "Debugger.nextWasmDisassemblyChunk"
 441}
 442
 443// Call the request.
 444func (m DebuggerNextWasmDisassemblyChunk) Call(c Client) (*DebuggerNextWasmDisassemblyChunkResult, error) {
 445	var res DebuggerNextWasmDisassemblyChunkResult
 446	return &res, call(m.ProtoReq(), m, &res, c)
 447}
 448
 449// DebuggerNextWasmDisassemblyChunkResult (experimental) ...
 450type DebuggerNextWasmDisassemblyChunkResult struct {
 451	// Chunk The next chunk of disassembly.
 452	Chunk *DebuggerWasmDisassemblyChunk `json:"chunk"`
 453}
 454
 455// DebuggerGetWasmBytecode (deprecated) This command is deprecated. Use getScriptSource instead.
 456type DebuggerGetWasmBytecode struct {
 457	// ScriptID Id of the Wasm script to get source for.
 458	ScriptID RuntimeScriptID `json:"scriptId"`
 459}
 460
 461// ProtoReq name.
 462func (m DebuggerGetWasmBytecode) ProtoReq() string { return "Debugger.getWasmBytecode" }
 463
 464// Call the request.
 465func (m DebuggerGetWasmBytecode) Call(c Client) (*DebuggerGetWasmBytecodeResult, error) {
 466	var res DebuggerGetWasmBytecodeResult
 467	return &res, call(m.ProtoReq(), m, &res, c)
 468}
 469
 470// DebuggerGetWasmBytecodeResult (deprecated) ...
 471type DebuggerGetWasmBytecodeResult struct {
 472	// Bytecode Script source.
 473	Bytecode []byte `json:"bytecode"`
 474}
 475
 476// DebuggerGetStackTrace (experimental) Returns stack trace with given `stackTraceId`.
 477type DebuggerGetStackTrace struct {
 478	// StackTraceID ...
 479	StackTraceID *RuntimeStackTraceID `json:"stackTraceId"`
 480}
 481
 482// ProtoReq name.
 483func (m DebuggerGetStackTrace) ProtoReq() string { return "Debugger.getStackTrace" }
 484
 485// Call the request.
 486func (m DebuggerGetStackTrace) Call(c Client) (*DebuggerGetStackTraceResult, error) {
 487	var res DebuggerGetStackTraceResult
 488	return &res, call(m.ProtoReq(), m, &res, c)
 489}
 490
 491// DebuggerGetStackTraceResult (experimental) ...
 492type DebuggerGetStackTraceResult struct {
 493	// StackTrace ...
 494	StackTrace *RuntimeStackTrace `json:"stackTrace"`
 495}
 496
 497// DebuggerPause Stops on the next JavaScript statement.
 498type DebuggerPause struct{}
 499
 500// ProtoReq name.
 501func (m DebuggerPause) ProtoReq() string { return "Debugger.pause" }
 502
 503// Call sends the request.
 504func (m DebuggerPause) Call(c Client) error {
 505	return call(m.ProtoReq(), m, nil, c)
 506}
 507
 508// DebuggerPauseOnAsyncCall (deprecated) (experimental) ...
 509type DebuggerPauseOnAsyncCall struct {
 510	// ParentStackTraceID Debugger will pause when async call with given stack trace is started.
 511	ParentStackTraceID *RuntimeStackTraceID `json:"parentStackTraceId"`
 512}
 513
 514// ProtoReq name.
 515func (m DebuggerPauseOnAsyncCall) ProtoReq() string { return "Debugger.pauseOnAsyncCall" }
 516
 517// Call sends the request.
 518func (m DebuggerPauseOnAsyncCall) Call(c Client) error {
 519	return call(m.ProtoReq(), m, nil, c)
 520}
 521
 522// DebuggerRemoveBreakpoint Removes JavaScript breakpoint.
 523type DebuggerRemoveBreakpoint struct {
 524	// BreakpointID ...
 525	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
 526}
 527
 528// ProtoReq name.
 529func (m DebuggerRemoveBreakpoint) ProtoReq() string { return "Debugger.removeBreakpoint" }
 530
 531// Call sends the request.
 532func (m DebuggerRemoveBreakpoint) Call(c Client) error {
 533	return call(m.ProtoReq(), m, nil, c)
 534}
 535
 536// DebuggerRestartFrameMode enum.
 537type DebuggerRestartFrameMode string
 538
 539const (
 540	// DebuggerRestartFrameModeStepInto enum const.
 541	DebuggerRestartFrameModeStepInto DebuggerRestartFrameMode = "StepInto"
 542)
 543
 544// DebuggerRestartFrame Restarts particular call frame from the beginning. The old, deprecated
 545// behavior of `restartFrame` is to stay paused and allow further CDP commands
 546// after a restart was scheduled. This can cause problems with restarting, so
 547// we now continue execution immediately after it has been scheduled until we
 548// reach the beginning of the restarted frame.
 549//
 550// To stay back-wards compatible, `restartFrame` now expects a `mode`
 551// parameter to be present. If the `mode` parameter is missing, `restartFrame`
 552// errors out.
 553//
 554// The various return values are deprecated and `callFrames` is always empty.
 555// Use the call frames from the `Debugger#paused` events instead, that fires
 556// once V8 pauses at the beginning of the restarted function.
 557type DebuggerRestartFrame struct {
 558	// CallFrameID Call frame identifier to evaluate on.
 559	CallFrameID DebuggerCallFrameID `json:"callFrameId"`
 560
 561	// Mode (experimental) (optional) The `mode` parameter must be present and set to 'StepInto', otherwise
 562	// `restartFrame` will error out.
 563	Mode DebuggerRestartFrameMode `json:"mode,omitempty"`
 564}
 565
 566// ProtoReq name.
 567func (m DebuggerRestartFrame) ProtoReq() string { return "Debugger.restartFrame" }
 568
 569// Call the request.
 570func (m DebuggerRestartFrame) Call(c Client) (*DebuggerRestartFrameResult, error) {
 571	var res DebuggerRestartFrameResult
 572	return &res, call(m.ProtoReq(), m, &res, c)
 573}
 574
 575// DebuggerRestartFrameResult ...
 576type DebuggerRestartFrameResult struct {
 577	// CallFrames (deprecated) New stack trace.
 578	CallFrames []*DebuggerCallFrame `json:"callFrames"`
 579
 580	// AsyncStackTrace (deprecated) (optional) Async stack trace, if any.
 581	AsyncStackTrace *RuntimeStackTrace `json:"asyncStackTrace,omitempty"`
 582
 583	// AsyncStackTraceID (deprecated) (optional) Async stack trace, if any.
 584	AsyncStackTraceID *RuntimeStackTraceID `json:"asyncStackTraceId,omitempty"`
 585}
 586
 587// DebuggerResume Resumes JavaScript execution.
 588type DebuggerResume struct {
 589	// TerminateOnResume (optional) Set to true to terminate execution upon resuming execution. In contrast
 590	// to Runtime.terminateExecution, this will allows to execute further
 591	// JavaScript (i.e. via evaluation) until execution of the paused code
 592	// is actually resumed, at which point termination is triggered.
 593	// If execution is currently not paused, this parameter has no effect.
 594	TerminateOnResume bool `json:"terminateOnResume,omitempty"`
 595}
 596
 597// ProtoReq name.
 598func (m DebuggerResume) ProtoReq() string { return "Debugger.resume" }
 599
 600// Call sends the request.
 601func (m DebuggerResume) Call(c Client) error {
 602	return call(m.ProtoReq(), m, nil, c)
 603}
 604
 605// DebuggerSearchInContent Searches for given string in script content.
 606type DebuggerSearchInContent struct {
 607	// ScriptID Id of the script to search in.
 608	ScriptID RuntimeScriptID `json:"scriptId"`
 609
 610	// Query String to search for.
 611	Query string `json:"query"`
 612
 613	// CaseSensitive (optional) If true, search is case sensitive.
 614	CaseSensitive bool `json:"caseSensitive,omitempty"`
 615
 616	// IsRegex (optional) If true, treats string parameter as regex.
 617	IsRegex bool `json:"isRegex,omitempty"`
 618}
 619
 620// ProtoReq name.
 621func (m DebuggerSearchInContent) ProtoReq() string { return "Debugger.searchInContent" }
 622
 623// Call the request.
 624func (m DebuggerSearchInContent) Call(c Client) (*DebuggerSearchInContentResult, error) {
 625	var res DebuggerSearchInContentResult
 626	return &res, call(m.ProtoReq(), m, &res, c)
 627}
 628
 629// DebuggerSearchInContentResult ...
 630type DebuggerSearchInContentResult struct {
 631	// Result List of search matches.
 632	Result []*DebuggerSearchMatch `json:"result"`
 633}
 634
 635// DebuggerSetAsyncCallStackDepth Enables or disables async call stacks tracking.
 636type DebuggerSetAsyncCallStackDepth struct {
 637	// MaxDepth Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
 638	// call stacks (default).
 639	MaxDepth int `json:"maxDepth"`
 640}
 641
 642// ProtoReq name.
 643func (m DebuggerSetAsyncCallStackDepth) ProtoReq() string { return "Debugger.setAsyncCallStackDepth" }
 644
 645// Call sends the request.
 646func (m DebuggerSetAsyncCallStackDepth) Call(c Client) error {
 647	return call(m.ProtoReq(), m, nil, c)
 648}
 649
 650// DebuggerSetBlackboxPatterns (experimental) Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
 651// scripts with url matching one of the patterns. VM will try to leave blackboxed script by
 652// performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
 653type DebuggerSetBlackboxPatterns struct {
 654	// Patterns Array of regexps that will be used to check script url for blackbox state.
 655	Patterns []string `json:"patterns"`
 656}
 657
 658// ProtoReq name.
 659func (m DebuggerSetBlackboxPatterns) ProtoReq() string { return "Debugger.setBlackboxPatterns" }
 660
 661// Call sends the request.
 662func (m DebuggerSetBlackboxPatterns) Call(c Client) error {
 663	return call(m.ProtoReq(), m, nil, c)
 664}
 665
 666// DebuggerSetBlackboxedRanges (experimental) Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
 667// scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
 668// Positions array contains positions where blackbox state is changed. First interval isn't
 669// blackboxed. Array should be sorted.
 670type DebuggerSetBlackboxedRanges struct {
 671	// ScriptID Id of the script.
 672	ScriptID RuntimeScriptID `json:"scriptId"`
 673
 674	// Positions ...
 675	Positions []*DebuggerScriptPosition `json:"positions"`
 676}
 677
 678// ProtoReq name.
 679func (m DebuggerSetBlackboxedRanges) ProtoReq() string { return "Debugger.setBlackboxedRanges" }
 680
 681// Call sends the request.
 682func (m DebuggerSetBlackboxedRanges) Call(c Client) error {
 683	return call(m.ProtoReq(), m, nil, c)
 684}
 685
 686// DebuggerSetBreakpoint Sets JavaScript breakpoint at a given location.
 687type DebuggerSetBreakpoint struct {
 688	// Location to set breakpoint in.
 689	Location *DebuggerLocation `json:"location"`
 690
 691	// Condition (optional) Expression to use as a breakpoint condition. When specified, debugger will only stop on the
 692	// breakpoint if this expression evaluates to true.
 693	Condition string `json:"condition,omitempty"`
 694}
 695
 696// ProtoReq name.
 697func (m DebuggerSetBreakpoint) ProtoReq() string { return "Debugger.setBreakpoint" }
 698
 699// Call the request.
 700func (m DebuggerSetBreakpoint) Call(c Client) (*DebuggerSetBreakpointResult, error) {
 701	var res DebuggerSetBreakpointResult
 702	return &res, call(m.ProtoReq(), m, &res, c)
 703}
 704
 705// DebuggerSetBreakpointResult ...
 706type DebuggerSetBreakpointResult struct {
 707	// BreakpointID Id of the created breakpoint for further reference.
 708	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
 709
 710	// ActualLocation Location this breakpoint resolved into.
 711	ActualLocation *DebuggerLocation `json:"actualLocation"`
 712}
 713
 714// DebuggerSetInstrumentationBreakpointInstrumentation enum.
 715type DebuggerSetInstrumentationBreakpointInstrumentation string
 716
 717const (
 718	// DebuggerSetInstrumentationBreakpointInstrumentationBeforeScriptExecution enum const.
 719	DebuggerSetInstrumentationBreakpointInstrumentationBeforeScriptExecution DebuggerSetInstrumentationBreakpointInstrumentation = "beforeScriptExecution"
 720
 721	// DebuggerSetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution enum const.
 722	DebuggerSetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution DebuggerSetInstrumentationBreakpointInstrumentation = "beforeScriptWithSourceMapExecution"
 723)
 724
 725// DebuggerSetInstrumentationBreakpoint Sets instrumentation breakpoint.
 726type DebuggerSetInstrumentationBreakpoint struct {
 727	// Instrumentation name.
 728	Instrumentation DebuggerSetInstrumentationBreakpointInstrumentation `json:"instrumentation"`
 729}
 730
 731// ProtoReq name.
 732func (m DebuggerSetInstrumentationBreakpoint) ProtoReq() string {
 733	return "Debugger.setInstrumentationBreakpoint"
 734}
 735
 736// Call the request.
 737func (m DebuggerSetInstrumentationBreakpoint) Call(c Client) (*DebuggerSetInstrumentationBreakpointResult, error) {
 738	var res DebuggerSetInstrumentationBreakpointResult
 739	return &res, call(m.ProtoReq(), m, &res, c)
 740}
 741
 742// DebuggerSetInstrumentationBreakpointResult ...
 743type DebuggerSetInstrumentationBreakpointResult struct {
 744	// BreakpointID Id of the created breakpoint for further reference.
 745	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
 746}
 747
 748// DebuggerSetBreakpointByURL Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
 749// command is issued, all existing parsed scripts will have breakpoints resolved and returned in
 750// `locations` property. Further matching script parsing will result in subsequent
 751// `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
 752type DebuggerSetBreakpointByURL struct {
 753	// LineNumber Line number to set breakpoint at.
 754	LineNumber int `json:"lineNumber"`
 755
 756	// URL (optional) URL of the resources to set breakpoint on.
 757	URL string `json:"url,omitempty"`
 758
 759	// URLRegex (optional) Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
 760	// `urlRegex` must be specified.
 761	URLRegex string `json:"urlRegex,omitempty"`
 762
 763	// ScriptHash (optional) Script hash of the resources to set breakpoint on.
 764	ScriptHash string `json:"scriptHash,omitempty"`
 765
 766	// ColumnNumber (optional) Offset in the line to set breakpoint at.
 767	ColumnNumber *int `json:"columnNumber,omitempty"`
 768
 769	// Condition (optional) Expression to use as a breakpoint condition. When specified, debugger will only stop on the
 770	// breakpoint if this expression evaluates to true.
 771	Condition string `json:"condition,omitempty"`
 772}
 773
 774// ProtoReq name.
 775func (m DebuggerSetBreakpointByURL) ProtoReq() string { return "Debugger.setBreakpointByUrl" }
 776
 777// Call the request.
 778func (m DebuggerSetBreakpointByURL) Call(c Client) (*DebuggerSetBreakpointByURLResult, error) {
 779	var res DebuggerSetBreakpointByURLResult
 780	return &res, call(m.ProtoReq(), m, &res, c)
 781}
 782
 783// DebuggerSetBreakpointByURLResult ...
 784type DebuggerSetBreakpointByURLResult struct {
 785	// BreakpointID Id of the created breakpoint for further reference.
 786	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
 787
 788	// Locations List of the locations this breakpoint resolved into upon addition.
 789	Locations []*DebuggerLocation `json:"locations"`
 790}
 791
 792// DebuggerSetBreakpointOnFunctionCall (experimental) Sets JavaScript breakpoint before each call to the given function.
 793// If another function was created from the same source as a given one,
 794// calling it will also trigger the breakpoint.
 795type DebuggerSetBreakpointOnFunctionCall struct {
 796	// ObjectID Function object id.
 797	ObjectID RuntimeRemoteObjectID `json:"objectId"`
 798
 799	// Condition (optional) Expression to use as a breakpoint condition. When specified, debugger will
 800	// stop on the breakpoint if this expression evaluates to true.
 801	Condition string `json:"condition,omitempty"`
 802}
 803
 804// ProtoReq name.
 805func (m DebuggerSetBreakpointOnFunctionCall) ProtoReq() string {
 806	return "Debugger.setBreakpointOnFunctionCall"
 807}
 808
 809// Call the request.
 810func (m DebuggerSetBreakpointOnFunctionCall) Call(c Client) (*DebuggerSetBreakpointOnFunctionCallResult, error) {
 811	var res DebuggerSetBreakpointOnFunctionCallResult
 812	return &res, call(m.ProtoReq(), m, &res, c)
 813}
 814
 815// DebuggerSetBreakpointOnFunctionCallResult (experimental) ...
 816type DebuggerSetBreakpointOnFunctionCallResult struct {
 817	// BreakpointID Id of the created breakpoint for further reference.
 818	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
 819}
 820
 821// DebuggerSetBreakpointsActive Activates / deactivates all breakpoints on the page.
 822type DebuggerSetBreakpointsActive struct {
 823	// Active New value for breakpoints active state.
 824	Active bool `json:"active"`
 825}
 826
 827// ProtoReq name.
 828func (m DebuggerSetBreakpointsActive) ProtoReq() string { return "Debugger.setBreakpointsActive" }
 829
 830// Call sends the request.
 831func (m DebuggerSetBreakpointsActive) Call(c Client) error {
 832	return call(m.ProtoReq(), m, nil, c)
 833}
 834
 835// DebuggerSetPauseOnExceptionsState enum.
 836type DebuggerSetPauseOnExceptionsState string
 837
 838const (
 839	// DebuggerSetPauseOnExceptionsStateNone enum const.
 840	DebuggerSetPauseOnExceptionsStateNone DebuggerSetPauseOnExceptionsState = "none"
 841
 842	// DebuggerSetPauseOnExceptionsStateCaught enum const.
 843	DebuggerSetPauseOnExceptionsStateCaught DebuggerSetPauseOnExceptionsState = "caught"
 844
 845	// DebuggerSetPauseOnExceptionsStateUncaught enum const.
 846	DebuggerSetPauseOnExceptionsStateUncaught DebuggerSetPauseOnExceptionsState = "uncaught"
 847
 848	// DebuggerSetPauseOnExceptionsStateAll enum const.
 849	DebuggerSetPauseOnExceptionsStateAll DebuggerSetPauseOnExceptionsState = "all"
 850)
 851
 852// DebuggerSetPauseOnExceptions Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
 853// or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
 854type DebuggerSetPauseOnExceptions struct {
 855	// State Pause on exceptions mode.
 856	State DebuggerSetPauseOnExceptionsState `json:"state"`
 857}
 858
 859// ProtoReq name.
 860func (m DebuggerSetPauseOnExceptions) ProtoReq() string { return "Debugger.setPauseOnExceptions" }
 861
 862// Call sends the request.
 863func (m DebuggerSetPauseOnExceptions) Call(c Client) error {
 864	return call(m.ProtoReq(), m, nil, c)
 865}
 866
 867// DebuggerSetReturnValue (experimental) Changes return value in top frame. Available only at return break position.
 868type DebuggerSetReturnValue struct {
 869	// NewValue New return value.
 870	NewValue *RuntimeCallArgument `json:"newValue"`
 871}
 872
 873// ProtoReq name.
 874func (m DebuggerSetReturnValue) ProtoReq() string { return "Debugger.setReturnValue" }
 875
 876// Call sends the request.
 877func (m DebuggerSetReturnValue) Call(c Client) error {
 878	return call(m.ProtoReq(), m, nil, c)
 879}
 880
 881// DebuggerSetScriptSource Edits JavaScript source live.
 882//
 883// In general, functions that are currently on the stack can not be edited with
 884// a single exception: If the edited function is the top-most stack frame and
 885// that is the only activation of that function on the stack. In this case
 886// the live edit will be successful and a `Debugger.restartFrame` for the
 887// top-most function is automatically triggered.
 888type DebuggerSetScriptSource struct {
 889	// ScriptID Id of the script to edit.
 890	ScriptID RuntimeScriptID `json:"scriptId"`
 891
 892	// ScriptSource New content of the script.
 893	ScriptSource string `json:"scriptSource"`
 894
 895	// DryRun (optional) If true the change will not actually be applied. Dry run may be used to get result
 896	// description without actually modifying the code.
 897	DryRun bool `json:"dryRun,omitempty"`
 898
 899	// AllowTopFrameEditing (experimental) (optional) If true, then `scriptSource` is allowed to change the function on top of the stack
 900	// as long as the top-most stack frame is the only activation of that function.
 901	AllowTopFrameEditing bool `json:"allowTopFrameEditing,omitempty"`
 902}
 903
 904// ProtoReq name.
 905func (m DebuggerSetScriptSource) ProtoReq() string { return "Debugger.setScriptSource" }
 906
 907// Call the request.
 908func (m DebuggerSetScriptSource) Call(c Client) (*DebuggerSetScriptSourceResult, error) {
 909	var res DebuggerSetScriptSourceResult
 910	return &res, call(m.ProtoReq(), m, &res, c)
 911}
 912
 913// DebuggerSetScriptSourceResultStatus enum.
 914type DebuggerSetScriptSourceResultStatus string
 915
 916const (
 917	// DebuggerSetScriptSourceResultStatusOk enum const.
 918	DebuggerSetScriptSourceResultStatusOk DebuggerSetScriptSourceResultStatus = "Ok"
 919
 920	// DebuggerSetScriptSourceResultStatusCompileError enum const.
 921	DebuggerSetScriptSourceResultStatusCompileError DebuggerSetScriptSourceResultStatus = "CompileError"
 922
 923	// DebuggerSetScriptSourceResultStatusBlockedByActiveGenerator enum const.
 924	DebuggerSetScriptSourceResultStatusBlockedByActiveGenerator DebuggerSetScriptSourceResultStatus = "BlockedByActiveGenerator"
 925
 926	// DebuggerSetScriptSourceResultStatusBlockedByActiveFunction enum const.
 927	DebuggerSetScriptSourceResultStatusBlockedByActiveFunction DebuggerSetScriptSourceResultStatus = "BlockedByActiveFunction"
 928
 929	// DebuggerSetScriptSourceResultStatusBlockedByTopLevelEsModuleChange enum const.
 930	DebuggerSetScriptSourceResultStatusBlockedByTopLevelEsModuleChange DebuggerSetScriptSourceResultStatus = "BlockedByTopLevelEsModuleChange"
 931)
 932
 933// DebuggerSetScriptSourceResult ...
 934type DebuggerSetScriptSourceResult struct {
 935	// CallFrames (deprecated) (optional) New stack trace in case editing has happened while VM was stopped.
 936	CallFrames []*DebuggerCallFrame `json:"callFrames,omitempty"`
 937
 938	// StackChanged (deprecated) (optional) Whether current call stack  was modified after applying the changes.
 939	StackChanged bool `json:"stackChanged,omitempty"`
 940
 941	// AsyncStackTrace (deprecated) (optional) Async stack trace, if any.
 942	AsyncStackTrace *RuntimeStackTrace `json:"asyncStackTrace,omitempty"`
 943
 944	// AsyncStackTraceID (deprecated) (optional) Async stack trace, if any.
 945	AsyncStackTraceID *RuntimeStackTraceID `json:"asyncStackTraceId,omitempty"`
 946
 947	// Status (experimental) Whether the operation was successful or not. Only `Ok` denotes a
 948	// successful live edit while the other enum variants denote why
 949	// the live edit failed.
 950	Status DebuggerSetScriptSourceResultStatus `json:"status"`
 951
 952	// ExceptionDetails (optional) Exception details if any. Only present when `status` is `CompileError`.
 953	ExceptionDetails *RuntimeExceptionDetails `json:"exceptionDetails,omitempty"`
 954}
 955
 956// DebuggerSetSkipAllPauses Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
 957type DebuggerSetSkipAllPauses struct {
 958	// Skip New value for skip pauses state.
 959	Skip bool `json:"skip"`
 960}
 961
 962// ProtoReq name.
 963func (m DebuggerSetSkipAllPauses) ProtoReq() string { return "Debugger.setSkipAllPauses" }
 964
 965// Call sends the request.
 966func (m DebuggerSetSkipAllPauses) Call(c Client) error {
 967	return call(m.ProtoReq(), m, nil, c)
 968}
 969
 970// DebuggerSetVariableValue Changes value of variable in a callframe. Object-based scopes are not supported and must be
 971// mutated manually.
 972type DebuggerSetVariableValue struct {
 973	// ScopeNumber 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
 974	// scope types are allowed. Other scopes could be manipulated manually.
 975	ScopeNumber int `json:"scopeNumber"`
 976
 977	// VariableName Variable name.
 978	VariableName string `json:"variableName"`
 979
 980	// NewValue New variable value.
 981	NewValue *RuntimeCallArgument `json:"newValue"`
 982
 983	// CallFrameID Id of callframe that holds variable.
 984	CallFrameID DebuggerCallFrameID `json:"callFrameId"`
 985}
 986
 987// ProtoReq name.
 988func (m DebuggerSetVariableValue) ProtoReq() string { return "Debugger.setVariableValue" }
 989
 990// Call sends the request.
 991func (m DebuggerSetVariableValue) Call(c Client) error {
 992	return call(m.ProtoReq(), m, nil, c)
 993}
 994
 995// DebuggerStepInto Steps into the function call.
 996type DebuggerStepInto struct {
 997	// BreakOnAsyncCall (experimental) (optional) Debugger will pause on the execution of the first async task which was scheduled
 998	// before next pause.
 999	BreakOnAsyncCall bool `json:"breakOnAsyncCall,omitempty"`
1000
1001	// SkipList (experimental) (optional) The skipList specifies location ranges that should be skipped on step into.
1002	SkipList []*DebuggerLocationRange `json:"skipList,omitempty"`
1003}
1004
1005// ProtoReq name.
1006func (m DebuggerStepInto) ProtoReq() string { return "Debugger.stepInto" }
1007
1008// Call sends the request.
1009func (m DebuggerStepInto) Call(c Client) error {
1010	return call(m.ProtoReq(), m, nil, c)
1011}
1012
1013// DebuggerStepOut Steps out of the function call.
1014type DebuggerStepOut struct{}
1015
1016// ProtoReq name.
1017func (m DebuggerStepOut) ProtoReq() string { return "Debugger.stepOut" }
1018
1019// Call sends the request.
1020func (m DebuggerStepOut) Call(c Client) error {
1021	return call(m.ProtoReq(), m, nil, c)
1022}
1023
1024// DebuggerStepOver Steps over the statement.
1025type DebuggerStepOver struct {
1026	// SkipList (experimental) (optional) The skipList specifies location ranges that should be skipped on step over.
1027	SkipList []*DebuggerLocationRange `json:"skipList,omitempty"`
1028}
1029
1030// ProtoReq name.
1031func (m DebuggerStepOver) ProtoReq() string { return "Debugger.stepOver" }
1032
1033// Call sends the request.
1034func (m DebuggerStepOver) Call(c Client) error {
1035	return call(m.ProtoReq(), m, nil, c)
1036}
1037
1038// DebuggerBreakpointResolved Fired when breakpoint is resolved to an actual script and location.
1039type DebuggerBreakpointResolved struct {
1040	// BreakpointID Breakpoint unique identifier.
1041	BreakpointID DebuggerBreakpointID `json:"breakpointId"`
1042
1043	// Location Actual breakpoint location.
1044	Location *DebuggerLocation `json:"location"`
1045}
1046
1047// ProtoEvent name.
1048func (evt DebuggerBreakpointResolved) ProtoEvent() string {
1049	return "Debugger.breakpointResolved"
1050}
1051
1052// DebuggerPausedReason enum.
1053type DebuggerPausedReason string
1054
1055const (
1056	// DebuggerPausedReasonAmbiguous enum const.
1057	DebuggerPausedReasonAmbiguous DebuggerPausedReason = "ambiguous"
1058
1059	// DebuggerPausedReasonAssert enum const.
1060	DebuggerPausedReasonAssert DebuggerPausedReason = "assert"
1061
1062	// DebuggerPausedReasonCSPViolation enum const.
1063	DebuggerPausedReasonCSPViolation DebuggerPausedReason = "CSPViolation"
1064
1065	// DebuggerPausedReasonDebugCommand enum const.
1066	DebuggerPausedReasonDebugCommand DebuggerPausedReason = "debugCommand"
1067
1068	// DebuggerPausedReasonDOM enum const.
1069	DebuggerPausedReasonDOM DebuggerPausedReason = "DOM"
1070
1071	// DebuggerPausedReasonEventListener enum const.
1072	DebuggerPausedReasonEventListener DebuggerPausedReason = "EventListener"
1073
1074	// DebuggerPausedReasonException enum const.
1075	DebuggerPausedReasonException DebuggerPausedReason = "exception"
1076
1077	// DebuggerPausedReasonInstrumentation enum const.
1078	DebuggerPausedReasonInstrumentation DebuggerPausedReason = "instrumentation"
1079
1080	// DebuggerPausedReasonOOM enum const.
1081	DebuggerPausedReasonOOM DebuggerPausedReason = "OOM"
1082
1083	// DebuggerPausedReasonOther enum const.
1084	DebuggerPausedReasonOther DebuggerPausedReason = "other"
1085
1086	// DebuggerPausedReasonPromiseRejection enum const.
1087	DebuggerPausedReasonPromiseRejection DebuggerPausedReason = "promiseRejection"
1088
1089	// DebuggerPausedReasonXHR enum const.
1090	DebuggerPausedReasonXHR DebuggerPausedReason = "XHR"
1091
1092	// DebuggerPausedReasonStep enum const.
1093	DebuggerPausedReasonStep DebuggerPausedReason = "step"
1094)
1095
1096// DebuggerPaused Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
1097type DebuggerPaused struct {
1098	// CallFrames Call stack the virtual machine stopped on.
1099	CallFrames []*DebuggerCallFrame `json:"callFrames"`
1100
1101	// Reason Pause reason.
1102	Reason DebuggerPausedReason `json:"reason"`
1103
1104	// Data (optional) Object containing break-specific auxiliary properties.
1105	Data map[string]gson.JSON `json:"data,omitempty"`
1106
1107	// HitBreakpoints (optional) Hit breakpoints IDs
1108	HitBreakpoints []string `json:"hitBreakpoints,omitempty"`
1109
1110	// AsyncStackTrace (optional) Async stack trace, if any.
1111	AsyncStackTrace *RuntimeStackTrace `json:"asyncStackTrace,omitempty"`
1112
1113	// AsyncStackTraceID (experimental) (optional) Async stack trace, if any.
1114	AsyncStackTraceID *RuntimeStackTraceID `json:"asyncStackTraceId,omitempty"`
1115
1116	// AsyncCallStackTraceID (deprecated) (experimental) (optional) Never present, will be removed.
1117	AsyncCallStackTraceID *RuntimeStackTraceID `json:"asyncCallStackTraceId,omitempty"`
1118}
1119
1120// ProtoEvent name.
1121func (evt DebuggerPaused) ProtoEvent() string {
1122	return "Debugger.paused"
1123}
1124
1125// DebuggerResumed Fired when the virtual machine resumed execution.
1126type DebuggerResumed struct{}
1127
1128// ProtoEvent name.
1129func (evt DebuggerResumed) ProtoEvent() string {
1130	return "Debugger.resumed"
1131}
1132
1133// DebuggerScriptFailedToParse Fired when virtual machine fails to parse the script.
1134type DebuggerScriptFailedToParse struct {
1135	// ScriptID Identifier of the script parsed.
1136	ScriptID RuntimeScriptID `json:"scriptId"`
1137
1138	// URL or name of the script parsed (if any).
1139	URL string `json:"url"`
1140
1141	// StartLine Line offset of the script within the resource with given URL (for script tags).
1142	StartLine int `json:"startLine"`
1143
1144	// StartColumn Column offset of the script within the resource with given URL.
1145	StartColumn int `json:"startColumn"`
1146
1147	// EndLine Last line of the script.
1148	EndLine int `json:"endLine"`
1149
1150	// EndColumn Length of the last line of the script.
1151	EndColumn int `json:"endColumn"`
1152
1153	// ExecutionContextID Specifies script creation context.
1154	ExecutionContextID RuntimeExecutionContextID `json:"executionContextId"`
1155
1156	// Hash Content hash of the script, SHA-256.
1157	Hash string `json:"hash"`
1158
1159	// ExecutionContextAuxData (optional) Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
1160	ExecutionContextAuxData map[string]gson.JSON `json:"executionContextAuxData,omitempty"`
1161
1162	// SourceMapURL (optional) URL of source map associated with script (if any).
1163	SourceMapURL string `json:"sourceMapURL,omitempty"`
1164
1165	// HasSourceURL (optional) True, if this script has sourceURL.
1166	HasSourceURL bool `json:"hasSourceURL,omitempty"`
1167
1168	// IsModule (optional) True, if this script is ES6 module.
1169	IsModule bool `json:"isModule,omitempty"`
1170
1171	// Length (optional) This script length.
1172	Length *int `json:"length,omitempty"`
1173
1174	// StackTrace (experimental) (optional) JavaScript top stack frame of where the script parsed event was triggered if available.
1175	StackTrace *RuntimeStackTrace `json:"stackTrace,omitempty"`
1176
1177	// CodeOffset (experimental) (optional) If the scriptLanguage is WebAssembly, the code section offset in the module.
1178	CodeOffset *int `json:"codeOffset,omitempty"`
1179
1180	// ScriptLanguage (experimental) (optional) The language of the script.
1181	ScriptLanguage DebuggerScriptLanguage `json:"scriptLanguage,omitempty"`
1182
1183	// EmbedderName (experimental) (optional) The name the embedder supplied for this script.
1184	EmbedderName string `json:"embedderName,omitempty"`
1185}
1186
1187// ProtoEvent name.
1188func (evt DebuggerScriptFailedToParse) ProtoEvent() string {
1189	return "Debugger.scriptFailedToParse"
1190}
1191
1192// DebuggerScriptParsed Fired when virtual machine parses script. This event is also fired for all known and uncollected
1193// scripts upon enabling debugger.
1194type DebuggerScriptParsed struct {
1195	// ScriptID Identifier of the script parsed.
1196	ScriptID RuntimeScriptID `json:"scriptId"`
1197
1198	// URL or name of the script parsed (if any).
1199	URL string `json:"url"`
1200
1201	// StartLine Line offset of the script within the resource with given URL (for script tags).
1202	StartLine int `json:"startLine"`
1203
1204	// StartColumn Column offset of the script within the resource with given URL.
1205	StartColumn int `json:"startColumn"`
1206
1207	// EndLine Last line of the script.
1208	EndLine int `json:"endLine"`
1209
1210	// EndColumn Length of the last line of the script.
1211	EndColumn int `json:"endColumn"`
1212
1213	// ExecutionContextID Specifies script creation context.
1214	ExecutionContextID RuntimeExecutionContextID `json:"executionContextId"`
1215
1216	// Hash Content hash of the script, SHA-256.
1217	Hash string `json:"hash"`
1218
1219	// ExecutionContextAuxData (optional) Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
1220	ExecutionContextAuxData map[string]gson.JSON `json:"executionContextAuxData,omitempty"`
1221
1222	// IsLiveEdit (experimental) (optional) True, if this script is generated as a result of the live edit operation.
1223	IsLiveEdit bool `json:"isLiveEdit,omitempty"`
1224
1225	// SourceMapURL (optional) URL of source map associated with script (if any).
1226	SourceMapURL string `json:"sourceMapURL,omitempty"`
1227
1228	// HasSourceURL (optional) True, if this script has sourceURL.
1229	HasSourceURL bool `json:"hasSourceURL,omitempty"`
1230
1231	// IsModule (optional) True, if this script is ES6 module.
1232	IsModule bool `json:"isModule,omitempty"`
1233
1234	// Length (optional) This script length.
1235	Length *int `json:"length,omitempty"`
1236
1237	// StackTrace (experimental) (optional) JavaScript top stack frame of where the script parsed event was triggered if available.
1238	StackTrace *RuntimeStackTrace `json:"stackTrace,omitempty"`
1239
1240	// CodeOffset (experimental) (optional) If the scriptLanguage is WebAssembly, the code section offset in the module.
1241	CodeOffset *int `json:"codeOffset,omitempty"`
1242
1243	// ScriptLanguage (experimental) (optional) The language of the script.
1244	ScriptLanguage DebuggerScriptLanguage `json:"scriptLanguage,omitempty"`
1245
1246	// DebugSymbols (experimental) (optional) If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
1247	DebugSymbols *DebuggerDebugSymbols `json:"debugSymbols,omitempty"`
1248
1249	// EmbedderName (experimental) (optional) The name the embedder supplied for this script.
1250	EmbedderName string `json:"embedderName,omitempty"`
1251}
1252
1253// ProtoEvent name.
1254func (evt DebuggerScriptParsed) ProtoEvent() string {
1255	return "Debugger.scriptParsed"
1256}