js_protocol.pdl 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815
  1. # Copyright 2017 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. version
  5. major 1
  6. minor 3
  7. # This domain is deprecated - use Runtime or Log instead.
  8. deprecated domain Console
  9. depends on Runtime
  10. # Console message.
  11. type ConsoleMessage extends object
  12. properties
  13. # Message source.
  14. enum source
  15. xml
  16. javascript
  17. network
  18. console-api
  19. storage
  20. appcache
  21. rendering
  22. security
  23. other
  24. deprecation
  25. worker
  26. # Message severity.
  27. enum level
  28. log
  29. warning
  30. error
  31. debug
  32. info
  33. # Message text.
  34. string text
  35. # URL of the message origin.
  36. optional string url
  37. # Line number in the resource that generated this message (1-based).
  38. optional integer line
  39. # Column number in the resource that generated this message (1-based).
  40. optional integer column
  41. # Does nothing.
  42. command clearMessages
  43. # Disables console domain, prevents further console messages from being reported to the client.
  44. command disable
  45. # Enables console domain, sends the messages collected so far to the client by means of the
  46. # `messageAdded` notification.
  47. command enable
  48. # Issued when new console message is added.
  49. event messageAdded
  50. parameters
  51. # Console message that has been added.
  52. ConsoleMessage message
  53. # Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing
  54. # breakpoints, stepping through execution, exploring stack traces, etc.
  55. domain Debugger
  56. depends on Runtime
  57. # Breakpoint identifier.
  58. type BreakpointId extends string
  59. # Call frame identifier.
  60. type CallFrameId extends string
  61. # Location in the source code.
  62. type Location extends object
  63. properties
  64. # Script identifier as reported in the `Debugger.scriptParsed`.
  65. Runtime.ScriptId scriptId
  66. # Line number in the script (0-based).
  67. integer lineNumber
  68. # Column number in the script (0-based).
  69. optional integer columnNumber
  70. # Location in the source code.
  71. experimental type ScriptPosition extends object
  72. properties
  73. integer lineNumber
  74. integer columnNumber
  75. # Location range within one script.
  76. experimental type LocationRange extends object
  77. properties
  78. Runtime.ScriptId scriptId
  79. ScriptPosition start
  80. ScriptPosition end
  81. # JavaScript call frame. Array of call frames form the call stack.
  82. type CallFrame extends object
  83. properties
  84. # Call frame identifier. This identifier is only valid while the virtual machine is paused.
  85. CallFrameId callFrameId
  86. # Name of the JavaScript function called on this call frame.
  87. string functionName
  88. # Location in the source code.
  89. optional Location functionLocation
  90. # Location in the source code.
  91. Location location
  92. # JavaScript script name or url.
  93. # Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously
  94. # sent `Debugger.scriptParsed` event.
  95. deprecated string url
  96. # Scope chain for this call frame.
  97. array of Scope scopeChain
  98. # `this` object for this call frame.
  99. Runtime.RemoteObject this
  100. # The value being returned, if the function is at return point.
  101. optional Runtime.RemoteObject returnValue
  102. # Valid only while the VM is paused and indicates whether this frame
  103. # can be restarted or not. Note that a `true` value here does not
  104. # guarantee that Debugger#restartFrame with this CallFrameId will be
  105. # successful, but it is very likely.
  106. experimental optional boolean canBeRestarted
  107. # Scope description.
  108. type Scope extends object
  109. properties
  110. # Scope type.
  111. enum type
  112. global
  113. local
  114. with
  115. closure
  116. catch
  117. block
  118. script
  119. eval
  120. module
  121. wasm-expression-stack
  122. # Object representing the scope. For `global` and `with` scopes it represents the actual
  123. # object; for the rest of the scopes, it is artificial transient object enumerating scope
  124. # variables as its properties.
  125. Runtime.RemoteObject object
  126. optional string name
  127. # Location in the source code where scope starts
  128. optional Location startLocation
  129. # Location in the source code where scope ends
  130. optional Location endLocation
  131. # Search match for resource.
  132. type SearchMatch extends object
  133. properties
  134. # Line number in resource content.
  135. number lineNumber
  136. # Line with match content.
  137. string lineContent
  138. type BreakLocation extends object
  139. properties
  140. # Script identifier as reported in the `Debugger.scriptParsed`.
  141. Runtime.ScriptId scriptId
  142. # Line number in the script (0-based).
  143. integer lineNumber
  144. # Column number in the script (0-based).
  145. optional integer columnNumber
  146. optional enum type
  147. debuggerStatement
  148. call
  149. return
  150. # Continues execution until specific location is reached.
  151. command continueToLocation
  152. parameters
  153. # Location to continue to.
  154. Location location
  155. optional enum targetCallFrames
  156. any
  157. current
  158. # Disables debugger for given page.
  159. command disable
  160. # Enables debugger for the given page. Clients should not assume that the debugging has been
  161. # enabled until the result for this command is received.
  162. command enable
  163. parameters
  164. # The maximum size in bytes of collected scripts (not referenced by other heap objects)
  165. # the debugger can hold. Puts no limit if parameter is omitted.
  166. experimental optional number maxScriptsCacheSize
  167. returns
  168. # Unique identifier of the debugger.
  169. experimental Runtime.UniqueDebuggerId debuggerId
  170. # Evaluates expression on a given call frame.
  171. command evaluateOnCallFrame
  172. parameters
  173. # Call frame identifier to evaluate on.
  174. CallFrameId callFrameId
  175. # Expression to evaluate.
  176. string expression
  177. # String object group name to put result into (allows rapid releasing resulting object handles
  178. # using `releaseObjectGroup`).
  179. optional string objectGroup
  180. # Specifies whether command line API should be available to the evaluated expression, defaults
  181. # to false.
  182. optional boolean includeCommandLineAPI
  183. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  184. # execution. Overrides `setPauseOnException` state.
  185. optional boolean silent
  186. # Whether the result is expected to be a JSON object that should be sent by value.
  187. optional boolean returnByValue
  188. # Whether preview should be generated for the result.
  189. experimental optional boolean generatePreview
  190. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  191. optional boolean throwOnSideEffect
  192. # Terminate execution after timing out (number of milliseconds).
  193. experimental optional Runtime.TimeDelta timeout
  194. returns
  195. # Object wrapper for the evaluation result.
  196. Runtime.RemoteObject result
  197. # Exception details.
  198. optional Runtime.ExceptionDetails exceptionDetails
  199. # Returns possible locations for breakpoint. scriptId in start and end range locations should be
  200. # the same.
  201. command getPossibleBreakpoints
  202. parameters
  203. # Start of range to search possible breakpoint locations in.
  204. Location start
  205. # End of range to search possible breakpoint locations in (excluding). When not specified, end
  206. # of scripts is used as end of range.
  207. optional Location end
  208. # Only consider locations which are in the same (non-nested) function as start.
  209. optional boolean restrictToFunction
  210. returns
  211. # List of the possible breakpoint locations.
  212. array of BreakLocation locations
  213. # Returns source for the script with given id.
  214. command getScriptSource
  215. parameters
  216. # Id of the script to get source for.
  217. Runtime.ScriptId scriptId
  218. returns
  219. # Script source (empty in case of Wasm bytecode).
  220. string scriptSource
  221. # Wasm bytecode.
  222. optional binary bytecode
  223. experimental type WasmDisassemblyChunk extends object
  224. properties
  225. # The next chunk of disassembled lines.
  226. array of string lines
  227. # The bytecode offsets describing the start of each line.
  228. array of integer bytecodeOffsets
  229. experimental command disassembleWasmModule
  230. parameters
  231. # Id of the script to disassemble
  232. Runtime.ScriptId scriptId
  233. returns
  234. # For large modules, return a stream from which additional chunks of
  235. # disassembly can be read successively.
  236. optional string streamId
  237. # The total number of lines in the disassembly text.
  238. integer totalNumberOfLines
  239. # The offsets of all function bodies, in the format [start1, end1,
  240. # start2, end2, ...] where all ends are exclusive.
  241. array of integer functionBodyOffsets
  242. # The first chunk of disassembly.
  243. WasmDisassemblyChunk chunk
  244. # Disassemble the next chunk of lines for the module corresponding to the
  245. # stream. If disassembly is complete, this API will invalidate the streamId
  246. # and return an empty chunk. Any subsequent calls for the now invalid stream
  247. # will return errors.
  248. experimental command nextWasmDisassemblyChunk
  249. parameters
  250. string streamId
  251. returns
  252. # The next chunk of disassembly.
  253. WasmDisassemblyChunk chunk
  254. # This command is deprecated. Use getScriptSource instead.
  255. deprecated command getWasmBytecode
  256. parameters
  257. # Id of the Wasm script to get source for.
  258. Runtime.ScriptId scriptId
  259. returns
  260. # Script source.
  261. binary bytecode
  262. # Returns stack trace with given `stackTraceId`.
  263. experimental command getStackTrace
  264. parameters
  265. Runtime.StackTraceId stackTraceId
  266. returns
  267. Runtime.StackTrace stackTrace
  268. # Stops on the next JavaScript statement.
  269. command pause
  270. experimental deprecated command pauseOnAsyncCall
  271. parameters
  272. # Debugger will pause when async call with given stack trace is started.
  273. Runtime.StackTraceId parentStackTraceId
  274. # Removes JavaScript breakpoint.
  275. command removeBreakpoint
  276. parameters
  277. BreakpointId breakpointId
  278. # Restarts particular call frame from the beginning. The old, deprecated
  279. # behavior of `restartFrame` is to stay paused and allow further CDP commands
  280. # after a restart was scheduled. This can cause problems with restarting, so
  281. # we now continue execution immediatly after it has been scheduled until we
  282. # reach the beginning of the restarted frame.
  283. #
  284. # To stay back-wards compatible, `restartFrame` now expects a `mode`
  285. # parameter to be present. If the `mode` parameter is missing, `restartFrame`
  286. # errors out.
  287. #
  288. # The various return values are deprecated and `callFrames` is always empty.
  289. # Use the call frames from the `Debugger#paused` events instead, that fires
  290. # once V8 pauses at the beginning of the restarted function.
  291. command restartFrame
  292. parameters
  293. # Call frame identifier to evaluate on.
  294. CallFrameId callFrameId
  295. # The `mode` parameter must be present and set to 'StepInto', otherwise
  296. # `restartFrame` will error out.
  297. experimental optional enum mode
  298. # Pause at the beginning of the restarted function
  299. StepInto
  300. returns
  301. # New stack trace.
  302. deprecated array of CallFrame callFrames
  303. # Async stack trace, if any.
  304. deprecated optional Runtime.StackTrace asyncStackTrace
  305. # Async stack trace, if any.
  306. deprecated optional Runtime.StackTraceId asyncStackTraceId
  307. # Resumes JavaScript execution.
  308. command resume
  309. parameters
  310. # Set to true to terminate execution upon resuming execution. In contrast
  311. # to Runtime.terminateExecution, this will allows to execute further
  312. # JavaScript (i.e. via evaluation) until execution of the paused code
  313. # is actually resumed, at which point termination is triggered.
  314. # If execution is currently not paused, this parameter has no effect.
  315. optional boolean terminateOnResume
  316. # Searches for given string in script content.
  317. command searchInContent
  318. parameters
  319. # Id of the script to search in.
  320. Runtime.ScriptId scriptId
  321. # String to search for.
  322. string query
  323. # If true, search is case sensitive.
  324. optional boolean caseSensitive
  325. # If true, treats string parameter as regex.
  326. optional boolean isRegex
  327. returns
  328. # List of search matches.
  329. array of SearchMatch result
  330. # Enables or disables async call stacks tracking.
  331. command setAsyncCallStackDepth
  332. parameters
  333. # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  334. # call stacks (default).
  335. integer maxDepth
  336. # Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
  337. # scripts with url matching one of the patterns. VM will try to leave blackboxed script by
  338. # performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  339. experimental command setBlackboxPatterns
  340. parameters
  341. # Array of regexps that will be used to check script url for blackbox state.
  342. array of string patterns
  343. # Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
  344. # scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  345. # Positions array contains positions where blackbox state is changed. First interval isn't
  346. # blackboxed. Array should be sorted.
  347. experimental command setBlackboxedRanges
  348. parameters
  349. # Id of the script.
  350. Runtime.ScriptId scriptId
  351. array of ScriptPosition positions
  352. # Sets JavaScript breakpoint at a given location.
  353. command setBreakpoint
  354. parameters
  355. # Location to set breakpoint in.
  356. Location location
  357. # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  358. # breakpoint if this expression evaluates to true.
  359. optional string condition
  360. returns
  361. # Id of the created breakpoint for further reference.
  362. BreakpointId breakpointId
  363. # Location this breakpoint resolved into.
  364. Location actualLocation
  365. # Sets instrumentation breakpoint.
  366. command setInstrumentationBreakpoint
  367. parameters
  368. # Instrumentation name.
  369. enum instrumentation
  370. beforeScriptExecution
  371. beforeScriptWithSourceMapExecution
  372. returns
  373. # Id of the created breakpoint for further reference.
  374. BreakpointId breakpointId
  375. # Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
  376. # command is issued, all existing parsed scripts will have breakpoints resolved and returned in
  377. # `locations` property. Further matching script parsing will result in subsequent
  378. # `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
  379. command setBreakpointByUrl
  380. parameters
  381. # Line number to set breakpoint at.
  382. integer lineNumber
  383. # URL of the resources to set breakpoint on.
  384. optional string url
  385. # Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
  386. # `urlRegex` must be specified.
  387. optional string urlRegex
  388. # Script hash of the resources to set breakpoint on.
  389. optional string scriptHash
  390. # Offset in the line to set breakpoint at.
  391. optional integer columnNumber
  392. # Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  393. # breakpoint if this expression evaluates to true.
  394. optional string condition
  395. returns
  396. # Id of the created breakpoint for further reference.
  397. BreakpointId breakpointId
  398. # List of the locations this breakpoint resolved into upon addition.
  399. array of Location locations
  400. # Sets JavaScript breakpoint before each call to the given function.
  401. # If another function was created from the same source as a given one,
  402. # calling it will also trigger the breakpoint.
  403. experimental command setBreakpointOnFunctionCall
  404. parameters
  405. # Function object id.
  406. Runtime.RemoteObjectId objectId
  407. # Expression to use as a breakpoint condition. When specified, debugger will
  408. # stop on the breakpoint if this expression evaluates to true.
  409. optional string condition
  410. returns
  411. # Id of the created breakpoint for further reference.
  412. BreakpointId breakpointId
  413. # Activates / deactivates all breakpoints on the page.
  414. command setBreakpointsActive
  415. parameters
  416. # New value for breakpoints active state.
  417. boolean active
  418. # Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
  419. # or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
  420. command setPauseOnExceptions
  421. parameters
  422. # Pause on exceptions mode.
  423. enum state
  424. none
  425. caught
  426. uncaught
  427. all
  428. # Changes return value in top frame. Available only at return break position.
  429. experimental command setReturnValue
  430. parameters
  431. # New return value.
  432. Runtime.CallArgument newValue
  433. # Edits JavaScript source live.
  434. #
  435. # In general, functions that are currently on the stack can not be edited with
  436. # a single exception: If the edited function is the top-most stack frame and
  437. # that is the only activation of that function on the stack. In this case
  438. # the live edit will be successful and a `Debugger.restartFrame` for the
  439. # top-most function is automatically triggered.
  440. command setScriptSource
  441. parameters
  442. # Id of the script to edit.
  443. Runtime.ScriptId scriptId
  444. # New content of the script.
  445. string scriptSource
  446. # If true the change will not actually be applied. Dry run may be used to get result
  447. # description without actually modifying the code.
  448. optional boolean dryRun
  449. # If true, then `scriptSource` is allowed to change the function on top of the stack
  450. # as long as the top-most stack frame is the only activation of that function.
  451. experimental optional boolean allowTopFrameEditing
  452. returns
  453. # New stack trace in case editing has happened while VM was stopped.
  454. deprecated optional array of CallFrame callFrames
  455. # Whether current call stack was modified after applying the changes.
  456. deprecated optional boolean stackChanged
  457. # Async stack trace, if any.
  458. deprecated optional Runtime.StackTrace asyncStackTrace
  459. # Async stack trace, if any.
  460. deprecated optional Runtime.StackTraceId asyncStackTraceId
  461. # Whether the operation was successful or not. Only `Ok` denotes a
  462. # successful live edit while the other enum variants denote why
  463. # the live edit failed.
  464. experimental enum status
  465. Ok
  466. CompileError
  467. BlockedByActiveGenerator
  468. BlockedByActiveFunction
  469. BlockedByTopLevelEsModuleChange
  470. # Exception details if any. Only present when `status` is `CompileError`.
  471. optional Runtime.ExceptionDetails exceptionDetails
  472. # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  473. command setSkipAllPauses
  474. parameters
  475. # New value for skip pauses state.
  476. boolean skip
  477. # Changes value of variable in a callframe. Object-based scopes are not supported and must be
  478. # mutated manually.
  479. command setVariableValue
  480. parameters
  481. # 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
  482. # scope types are allowed. Other scopes could be manipulated manually.
  483. integer scopeNumber
  484. # Variable name.
  485. string variableName
  486. # New variable value.
  487. Runtime.CallArgument newValue
  488. # Id of callframe that holds variable.
  489. CallFrameId callFrameId
  490. # Steps into the function call.
  491. command stepInto
  492. parameters
  493. # Debugger will pause on the execution of the first async task which was scheduled
  494. # before next pause.
  495. experimental optional boolean breakOnAsyncCall
  496. # The skipList specifies location ranges that should be skipped on step into.
  497. experimental optional array of LocationRange skipList
  498. # Steps out of the function call.
  499. command stepOut
  500. # Steps over the statement.
  501. command stepOver
  502. parameters
  503. # The skipList specifies location ranges that should be skipped on step over.
  504. experimental optional array of LocationRange skipList
  505. # Fired when breakpoint is resolved to an actual script and location.
  506. event breakpointResolved
  507. parameters
  508. # Breakpoint unique identifier.
  509. BreakpointId breakpointId
  510. # Actual breakpoint location.
  511. Location location
  512. # Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  513. event paused
  514. parameters
  515. # Call stack the virtual machine stopped on.
  516. array of CallFrame callFrames
  517. # Pause reason.
  518. enum reason
  519. ambiguous
  520. assert
  521. CSPViolation
  522. debugCommand
  523. DOM
  524. EventListener
  525. exception
  526. instrumentation
  527. OOM
  528. other
  529. promiseRejection
  530. XHR
  531. step
  532. # Object containing break-specific auxiliary properties.
  533. optional object data
  534. # Hit breakpoints IDs
  535. optional array of string hitBreakpoints
  536. # Async stack trace, if any.
  537. optional Runtime.StackTrace asyncStackTrace
  538. # Async stack trace, if any.
  539. experimental optional Runtime.StackTraceId asyncStackTraceId
  540. # Never present, will be removed.
  541. experimental deprecated optional Runtime.StackTraceId asyncCallStackTraceId
  542. # Fired when the virtual machine resumed execution.
  543. event resumed
  544. # Enum of possible script languages.
  545. type ScriptLanguage extends string
  546. enum
  547. JavaScript
  548. WebAssembly
  549. # Debug symbols available for a wasm script.
  550. type DebugSymbols extends object
  551. properties
  552. # Type of the debug symbols.
  553. enum type
  554. None
  555. SourceMap
  556. EmbeddedDWARF
  557. ExternalDWARF
  558. # URL of the external symbol source.
  559. optional string externalURL
  560. # Fired when virtual machine fails to parse the script.
  561. event scriptFailedToParse
  562. parameters
  563. # Identifier of the script parsed.
  564. Runtime.ScriptId scriptId
  565. # URL or name of the script parsed (if any).
  566. string url
  567. # Line offset of the script within the resource with given URL (for script tags).
  568. integer startLine
  569. # Column offset of the script within the resource with given URL.
  570. integer startColumn
  571. # Last line of the script.
  572. integer endLine
  573. # Length of the last line of the script.
  574. integer endColumn
  575. # Specifies script creation context.
  576. Runtime.ExecutionContextId executionContextId
  577. # Content hash of the script, SHA-256.
  578. string hash
  579. # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
  580. optional object executionContextAuxData
  581. # URL of source map associated with script (if any).
  582. optional string sourceMapURL
  583. # True, if this script has sourceURL.
  584. optional boolean hasSourceURL
  585. # True, if this script is ES6 module.
  586. optional boolean isModule
  587. # This script length.
  588. optional integer length
  589. # JavaScript top stack frame of where the script parsed event was triggered if available.
  590. experimental optional Runtime.StackTrace stackTrace
  591. # If the scriptLanguage is WebAssembly, the code section offset in the module.
  592. experimental optional integer codeOffset
  593. # The language of the script.
  594. experimental optional Debugger.ScriptLanguage scriptLanguage
  595. # The name the embedder supplied for this script.
  596. experimental optional string embedderName
  597. # Fired when virtual machine parses script. This event is also fired for all known and uncollected
  598. # scripts upon enabling debugger.
  599. event scriptParsed
  600. parameters
  601. # Identifier of the script parsed.
  602. Runtime.ScriptId scriptId
  603. # URL or name of the script parsed (if any).
  604. string url
  605. # Line offset of the script within the resource with given URL (for script tags).
  606. integer startLine
  607. # Column offset of the script within the resource with given URL.
  608. integer startColumn
  609. # Last line of the script.
  610. integer endLine
  611. # Length of the last line of the script.
  612. integer endColumn
  613. # Specifies script creation context.
  614. Runtime.ExecutionContextId executionContextId
  615. # Content hash of the script, SHA-256.
  616. string hash
  617. # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
  618. optional object executionContextAuxData
  619. # True, if this script is generated as a result of the live edit operation.
  620. experimental optional boolean isLiveEdit
  621. # URL of source map associated with script (if any).
  622. optional string sourceMapURL
  623. # True, if this script has sourceURL.
  624. optional boolean hasSourceURL
  625. # True, if this script is ES6 module.
  626. optional boolean isModule
  627. # This script length.
  628. optional integer length
  629. # JavaScript top stack frame of where the script parsed event was triggered if available.
  630. experimental optional Runtime.StackTrace stackTrace
  631. # If the scriptLanguage is WebAssembly, the code section offset in the module.
  632. experimental optional integer codeOffset
  633. # The language of the script.
  634. experimental optional Debugger.ScriptLanguage scriptLanguage
  635. # If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
  636. experimental optional Debugger.DebugSymbols debugSymbols
  637. # The name the embedder supplied for this script.
  638. experimental optional string embedderName
  639. experimental domain HeapProfiler
  640. depends on Runtime
  641. # Heap snapshot object id.
  642. type HeapSnapshotObjectId extends string
  643. # Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
  644. type SamplingHeapProfileNode extends object
  645. properties
  646. # Function location.
  647. Runtime.CallFrame callFrame
  648. # Allocations size in bytes for the node excluding children.
  649. number selfSize
  650. # Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
  651. integer id
  652. # Child nodes.
  653. array of SamplingHeapProfileNode children
  654. # A single sample from a sampling profile.
  655. type SamplingHeapProfileSample extends object
  656. properties
  657. # Allocation size in bytes attributed to the sample.
  658. number size
  659. # Id of the corresponding profile tree node.
  660. integer nodeId
  661. # Time-ordered sample ordinal number. It is unique across all profiles retrieved
  662. # between startSampling and stopSampling.
  663. number ordinal
  664. # Sampling profile.
  665. type SamplingHeapProfile extends object
  666. properties
  667. SamplingHeapProfileNode head
  668. array of SamplingHeapProfileSample samples
  669. # Enables console to refer to the node with given id via $x (see Command Line API for more details
  670. # $x functions).
  671. command addInspectedHeapObject
  672. parameters
  673. # Heap snapshot object id to be accessible by means of $x command line API.
  674. HeapSnapshotObjectId heapObjectId
  675. command collectGarbage
  676. command disable
  677. command enable
  678. command getHeapObjectId
  679. parameters
  680. # Identifier of the object to get heap object id for.
  681. Runtime.RemoteObjectId objectId
  682. returns
  683. # Id of the heap snapshot object corresponding to the passed remote object id.
  684. HeapSnapshotObjectId heapSnapshotObjectId
  685. command getObjectByHeapObjectId
  686. parameters
  687. HeapSnapshotObjectId objectId
  688. # Symbolic group name that can be used to release multiple objects.
  689. optional string objectGroup
  690. returns
  691. # Evaluation result.
  692. Runtime.RemoteObject result
  693. command getSamplingProfile
  694. returns
  695. # Return the sampling profile being collected.
  696. SamplingHeapProfile profile
  697. command startSampling
  698. parameters
  699. # Average sample interval in bytes. Poisson distribution is used for the intervals. The
  700. # default value is 32768 bytes.
  701. optional number samplingInterval
  702. # By default, the sampling heap profiler reports only objects which are
  703. # still alive when the profile is returned via getSamplingProfile or
  704. # stopSampling, which is useful for determining what functions contribute
  705. # the most to steady-state memory usage. This flag instructs the sampling
  706. # heap profiler to also include information about objects discarded by
  707. # major GC, which will show which functions cause large temporary memory
  708. # usage or long GC pauses.
  709. optional boolean includeObjectsCollectedByMajorGC
  710. # By default, the sampling heap profiler reports only objects which are
  711. # still alive when the profile is returned via getSamplingProfile or
  712. # stopSampling, which is useful for determining what functions contribute
  713. # the most to steady-state memory usage. This flag instructs the sampling
  714. # heap profiler to also include information about objects discarded by
  715. # minor GC, which is useful when tuning a latency-sensitive application
  716. # for minimal GC activity.
  717. optional boolean includeObjectsCollectedByMinorGC
  718. command startTrackingHeapObjects
  719. parameters
  720. optional boolean trackAllocations
  721. command stopSampling
  722. returns
  723. # Recorded sampling heap profile.
  724. SamplingHeapProfile profile
  725. command stopTrackingHeapObjects
  726. parameters
  727. # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
  728. # when the tracking is stopped.
  729. optional boolean reportProgress
  730. # Deprecated in favor of `exposeInternals`.
  731. deprecated optional boolean treatGlobalObjectsAsRoots
  732. # If true, numerical values are included in the snapshot
  733. optional boolean captureNumericValue
  734. # If true, exposes internals of the snapshot.
  735. experimental optional boolean exposeInternals
  736. command takeHeapSnapshot
  737. parameters
  738. # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
  739. optional boolean reportProgress
  740. # If true, a raw snapshot without artificial roots will be generated.
  741. # Deprecated in favor of `exposeInternals`.
  742. deprecated optional boolean treatGlobalObjectsAsRoots
  743. # If true, numerical values are included in the snapshot
  744. optional boolean captureNumericValue
  745. # If true, exposes internals of the snapshot.
  746. experimental optional boolean exposeInternals
  747. event addHeapSnapshotChunk
  748. parameters
  749. string chunk
  750. # If heap objects tracking has been started then backend may send update for one or more fragments
  751. event heapStatsUpdate
  752. parameters
  753. # An array of triplets. Each triplet describes a fragment. The first integer is the fragment
  754. # index, the second integer is a total count of objects for the fragment, the third integer is
  755. # a total size of the objects for the fragment.
  756. array of integer statsUpdate
  757. # If heap objects tracking has been started then backend regularly sends a current value for last
  758. # seen object id and corresponding timestamp. If the were changes in the heap since last event
  759. # then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  760. event lastSeenObjectId
  761. parameters
  762. integer lastSeenObjectId
  763. number timestamp
  764. event reportHeapSnapshotProgress
  765. parameters
  766. integer done
  767. integer total
  768. optional boolean finished
  769. event resetProfiles
  770. domain Profiler
  771. depends on Runtime
  772. depends on Debugger
  773. # Profile node. Holds callsite information, execution statistics and child nodes.
  774. type ProfileNode extends object
  775. properties
  776. # Unique id of the node.
  777. integer id
  778. # Function location.
  779. Runtime.CallFrame callFrame
  780. # Number of samples where this node was on top of the call stack.
  781. optional integer hitCount
  782. # Child node ids.
  783. optional array of integer children
  784. # The reason of being not optimized. The function may be deoptimized or marked as don't
  785. # optimize.
  786. optional string deoptReason
  787. # An array of source position ticks.
  788. optional array of PositionTickInfo positionTicks
  789. # Profile.
  790. type Profile extends object
  791. properties
  792. # The list of profile nodes. First item is the root node.
  793. array of ProfileNode nodes
  794. # Profiling start timestamp in microseconds.
  795. number startTime
  796. # Profiling end timestamp in microseconds.
  797. number endTime
  798. # Ids of samples top nodes.
  799. optional array of integer samples
  800. # Time intervals between adjacent samples in microseconds. The first delta is relative to the
  801. # profile startTime.
  802. optional array of integer timeDeltas
  803. # Specifies a number of samples attributed to a certain source position.
  804. type PositionTickInfo extends object
  805. properties
  806. # Source line number (1-based).
  807. integer line
  808. # Number of samples attributed to the source line.
  809. integer ticks
  810. # Coverage data for a source range.
  811. type CoverageRange extends object
  812. properties
  813. # JavaScript script source offset for the range start.
  814. integer startOffset
  815. # JavaScript script source offset for the range end.
  816. integer endOffset
  817. # Collected execution count of the source range.
  818. integer count
  819. # Coverage data for a JavaScript function.
  820. type FunctionCoverage extends object
  821. properties
  822. # JavaScript function name.
  823. string functionName
  824. # Source ranges inside the function with coverage data.
  825. array of CoverageRange ranges
  826. # Whether coverage data for this function has block granularity.
  827. boolean isBlockCoverage
  828. # Coverage data for a JavaScript script.
  829. type ScriptCoverage extends object
  830. properties
  831. # JavaScript script id.
  832. Runtime.ScriptId scriptId
  833. # JavaScript script name or url.
  834. string url
  835. # Functions contained in the script that has coverage data.
  836. array of FunctionCoverage functions
  837. command disable
  838. command enable
  839. # Collect coverage data for the current isolate. The coverage data may be incomplete due to
  840. # garbage collection.
  841. command getBestEffortCoverage
  842. returns
  843. # Coverage data for the current isolate.
  844. array of ScriptCoverage result
  845. # Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  846. command setSamplingInterval
  847. parameters
  848. # New sampling interval in microseconds.
  849. integer interval
  850. command start
  851. # Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
  852. # coverage may be incomplete. Enabling prevents running optimized code and resets execution
  853. # counters.
  854. command startPreciseCoverage
  855. parameters
  856. # Collect accurate call counts beyond simple 'covered' or 'not covered'.
  857. optional boolean callCount
  858. # Collect block-based coverage.
  859. optional boolean detailed
  860. # Allow the backend to send updates on its own initiative
  861. optional boolean allowTriggeredUpdates
  862. returns
  863. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  864. number timestamp
  865. command stop
  866. returns
  867. # Recorded profile.
  868. Profile profile
  869. # Disable precise code coverage. Disabling releases unnecessary execution count records and allows
  870. # executing optimized code.
  871. command stopPreciseCoverage
  872. # Collect coverage data for the current isolate, and resets execution counters. Precise code
  873. # coverage needs to have started.
  874. command takePreciseCoverage
  875. returns
  876. # Coverage data for the current isolate.
  877. array of ScriptCoverage result
  878. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  879. number timestamp
  880. event consoleProfileFinished
  881. parameters
  882. string id
  883. # Location of console.profileEnd().
  884. Debugger.Location location
  885. Profile profile
  886. # Profile title passed as an argument to console.profile().
  887. optional string title
  888. # Sent when new profile recording is started using console.profile() call.
  889. event consoleProfileStarted
  890. parameters
  891. string id
  892. # Location of console.profile().
  893. Debugger.Location location
  894. # Profile title passed as an argument to console.profile().
  895. optional string title
  896. # Reports coverage delta since the last poll (either from an event like this, or from
  897. # `takePreciseCoverage` for the current isolate. May only be sent if precise code
  898. # coverage has been started. This event can be trigged by the embedder to, for example,
  899. # trigger collection of coverage data immediately at a certain point in time.
  900. experimental event preciseCoverageDeltaUpdate
  901. parameters
  902. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  903. number timestamp
  904. # Identifier for distinguishing coverage events.
  905. string occasion
  906. # Coverage data for the current isolate.
  907. array of ScriptCoverage result
  908. # Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
  909. # Evaluation results are returned as mirror object that expose object type, string representation
  910. # and unique identifier that can be used for further object reference. Original objects are
  911. # maintained in memory unless they are either explicitly released or are released along with the
  912. # other objects in their object group.
  913. domain Runtime
  914. # Unique script identifier.
  915. type ScriptId extends string
  916. # Represents options for serialization. Overrides `generatePreview`, `returnByValue` and
  917. # `generateWebDriverValue`.
  918. type SerializationOptions extends object
  919. properties
  920. enum serialization
  921. # Whether the result should be deep-serialized. The result is put into
  922. # `deepSerializedValue` and `ObjectId` is provided.
  923. deep
  924. # Whether the result is expected to be a JSON object which should be sent by value.
  925. # The result is put either into `value` or into `unserializableValue`. Synonym of
  926. # `returnByValue: true`. Overrides `returnByValue`.
  927. json
  928. # Only remote object id is put in the result. Same bahaviour as if no
  929. # `serializationOptions`, `generatePreview`, `returnByValue` nor `generateWebDriverValue`
  930. # are provided.
  931. idOnly
  932. # Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
  933. optional integer maxDepth
  934. # Represents deep serialized value.
  935. type DeepSerializedValue extends object
  936. properties
  937. enum type
  938. undefined
  939. null
  940. string
  941. number
  942. boolean
  943. bigint
  944. regexp
  945. date
  946. symbol
  947. array
  948. object
  949. function
  950. map
  951. set
  952. weakmap
  953. weakset
  954. error
  955. proxy
  956. promise
  957. typedarray
  958. arraybuffer
  959. node
  960. window
  961. optional any value
  962. optional string objectId
  963. # Set if value reference met more then once during serialization. In such
  964. # case, value is provided only to one of the serialized values. Unique
  965. # per value in the scope of one CDP call.
  966. optional integer weakLocalObjectReference
  967. # Unique object identifier.
  968. type RemoteObjectId extends string
  969. # Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
  970. # `-Infinity`, and bigint literals.
  971. type UnserializableValue extends string
  972. # Mirror object referencing original JavaScript object.
  973. type RemoteObject extends object
  974. properties
  975. # Object type.
  976. enum type
  977. object
  978. function
  979. undefined
  980. string
  981. number
  982. boolean
  983. symbol
  984. bigint
  985. # Object subtype hint. Specified for `object` type values only.
  986. # NOTE: If you change anything here, make sure to also update
  987. # `subtype` in `ObjectPreview` and `PropertyPreview` below.
  988. optional enum subtype
  989. array
  990. null
  991. node
  992. regexp
  993. date
  994. map
  995. set
  996. weakmap
  997. weakset
  998. iterator
  999. generator
  1000. error
  1001. proxy
  1002. promise
  1003. typedarray
  1004. arraybuffer
  1005. dataview
  1006. webassemblymemory
  1007. wasmvalue
  1008. # Object class (constructor) name. Specified for `object` type values only.
  1009. optional string className
  1010. # Remote object value in case of primitive values or JSON values (if it was requested).
  1011. optional any value
  1012. # Primitive value which can not be JSON-stringified does not have `value`, but gets this
  1013. # property.
  1014. optional UnserializableValue unserializableValue
  1015. # String representation of the object.
  1016. optional string description
  1017. # Deprecated. Use `deepSerializedValue` instead. WebDriver BiDi representation of the value.
  1018. deprecated optional DeepSerializedValue webDriverValue
  1019. # Deep serialized value.
  1020. experimental optional DeepSerializedValue deepSerializedValue
  1021. # Unique object identifier (for non-primitive values).
  1022. optional RemoteObjectId objectId
  1023. # Preview containing abbreviated property values. Specified for `object` type values only.
  1024. experimental optional ObjectPreview preview
  1025. experimental optional CustomPreview customPreview
  1026. experimental type CustomPreview extends object
  1027. properties
  1028. # The JSON-stringified result of formatter.header(object, config) call.
  1029. # It contains json ML array that represents RemoteObject.
  1030. string header
  1031. # If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
  1032. # contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
  1033. # The result value is json ML array.
  1034. optional RemoteObjectId bodyGetterId
  1035. # Object containing abbreviated remote object value.
  1036. experimental type ObjectPreview extends object
  1037. properties
  1038. # Object type.
  1039. enum type
  1040. object
  1041. function
  1042. undefined
  1043. string
  1044. number
  1045. boolean
  1046. symbol
  1047. bigint
  1048. # Object subtype hint. Specified for `object` type values only.
  1049. optional enum subtype
  1050. array
  1051. null
  1052. node
  1053. regexp
  1054. date
  1055. map
  1056. set
  1057. weakmap
  1058. weakset
  1059. iterator
  1060. generator
  1061. error
  1062. proxy
  1063. promise
  1064. typedarray
  1065. arraybuffer
  1066. dataview
  1067. webassemblymemory
  1068. wasmvalue
  1069. # String representation of the object.
  1070. optional string description
  1071. # True iff some of the properties or entries of the original object did not fit.
  1072. boolean overflow
  1073. # List of the properties.
  1074. array of PropertyPreview properties
  1075. # List of the entries. Specified for `map` and `set` subtype values only.
  1076. optional array of EntryPreview entries
  1077. experimental type PropertyPreview extends object
  1078. properties
  1079. # Property name.
  1080. string name
  1081. # Object type. Accessor means that the property itself is an accessor property.
  1082. enum type
  1083. object
  1084. function
  1085. undefined
  1086. string
  1087. number
  1088. boolean
  1089. symbol
  1090. accessor
  1091. bigint
  1092. # User-friendly property value string.
  1093. optional string value
  1094. # Nested value preview.
  1095. optional ObjectPreview valuePreview
  1096. # Object subtype hint. Specified for `object` type values only.
  1097. optional enum subtype
  1098. array
  1099. null
  1100. node
  1101. regexp
  1102. date
  1103. map
  1104. set
  1105. weakmap
  1106. weakset
  1107. iterator
  1108. generator
  1109. error
  1110. proxy
  1111. promise
  1112. typedarray
  1113. arraybuffer
  1114. dataview
  1115. webassemblymemory
  1116. wasmvalue
  1117. experimental type EntryPreview extends object
  1118. properties
  1119. # Preview of the key. Specified for map-like collection entries.
  1120. optional ObjectPreview key
  1121. # Preview of the value.
  1122. ObjectPreview value
  1123. # Object property descriptor.
  1124. type PropertyDescriptor extends object
  1125. properties
  1126. # Property name or symbol description.
  1127. string name
  1128. # The value associated with the property.
  1129. optional RemoteObject value
  1130. # True if the value associated with the property may be changed (data descriptors only).
  1131. optional boolean writable
  1132. # A function which serves as a getter for the property, or `undefined` if there is no getter
  1133. # (accessor descriptors only).
  1134. optional RemoteObject get
  1135. # A function which serves as a setter for the property, or `undefined` if there is no setter
  1136. # (accessor descriptors only).
  1137. optional RemoteObject set
  1138. # True if the type of this property descriptor may be changed and if the property may be
  1139. # deleted from the corresponding object.
  1140. boolean configurable
  1141. # True if this property shows up during enumeration of the properties on the corresponding
  1142. # object.
  1143. boolean enumerable
  1144. # True if the result was thrown during the evaluation.
  1145. optional boolean wasThrown
  1146. # True if the property is owned for the object.
  1147. optional boolean isOwn
  1148. # Property symbol object, if the property is of the `symbol` type.
  1149. optional RemoteObject symbol
  1150. # Object internal property descriptor. This property isn't normally visible in JavaScript code.
  1151. type InternalPropertyDescriptor extends object
  1152. properties
  1153. # Conventional property name.
  1154. string name
  1155. # The value associated with the property.
  1156. optional RemoteObject value
  1157. # Object private field descriptor.
  1158. experimental type PrivatePropertyDescriptor extends object
  1159. properties
  1160. # Private property name.
  1161. string name
  1162. # The value associated with the private property.
  1163. optional RemoteObject value
  1164. # A function which serves as a getter for the private property,
  1165. # or `undefined` if there is no getter (accessor descriptors only).
  1166. optional RemoteObject get
  1167. # A function which serves as a setter for the private property,
  1168. # or `undefined` if there is no setter (accessor descriptors only).
  1169. optional RemoteObject set
  1170. # Represents function call argument. Either remote object id `objectId`, primitive `value`,
  1171. # unserializable primitive value or neither of (for undefined) them should be specified.
  1172. type CallArgument extends object
  1173. properties
  1174. # Primitive value or serializable javascript object.
  1175. optional any value
  1176. # Primitive value which can not be JSON-stringified.
  1177. optional UnserializableValue unserializableValue
  1178. # Remote object handle.
  1179. optional RemoteObjectId objectId
  1180. # Id of an execution context.
  1181. type ExecutionContextId extends integer
  1182. # Description of an isolated world.
  1183. type ExecutionContextDescription extends object
  1184. properties
  1185. # Unique id of the execution context. It can be used to specify in which execution context
  1186. # script evaluation should be performed.
  1187. ExecutionContextId id
  1188. # Execution context origin.
  1189. string origin
  1190. # Human readable name describing given context.
  1191. string name
  1192. # A system-unique execution context identifier. Unlike the id, this is unique across
  1193. # multiple processes, so can be reliably used to identify specific context while backend
  1194. # performs a cross-process navigation.
  1195. experimental string uniqueId
  1196. # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
  1197. optional object auxData
  1198. # Detailed information about exception (or error) that was thrown during script compilation or
  1199. # execution.
  1200. type ExceptionDetails extends object
  1201. properties
  1202. # Exception id.
  1203. integer exceptionId
  1204. # Exception text, which should be used together with exception object when available.
  1205. string text
  1206. # Line number of the exception location (0-based).
  1207. integer lineNumber
  1208. # Column number of the exception location (0-based).
  1209. integer columnNumber
  1210. # Script ID of the exception location.
  1211. optional ScriptId scriptId
  1212. # URL of the exception location, to be used when the script was not reported.
  1213. optional string url
  1214. # JavaScript stack trace if available.
  1215. optional StackTrace stackTrace
  1216. # Exception object if available.
  1217. optional RemoteObject exception
  1218. # Identifier of the context where exception happened.
  1219. optional ExecutionContextId executionContextId
  1220. # Dictionary with entries of meta data that the client associated
  1221. # with this exception, such as information about associated network
  1222. # requests, etc.
  1223. experimental optional object exceptionMetaData
  1224. # Number of milliseconds since epoch.
  1225. type Timestamp extends number
  1226. # Number of milliseconds.
  1227. type TimeDelta extends number
  1228. # Stack entry for runtime errors and assertions.
  1229. type CallFrame extends object
  1230. properties
  1231. # JavaScript function name.
  1232. string functionName
  1233. # JavaScript script id.
  1234. ScriptId scriptId
  1235. # JavaScript script name or url.
  1236. string url
  1237. # JavaScript script line number (0-based).
  1238. integer lineNumber
  1239. # JavaScript script column number (0-based).
  1240. integer columnNumber
  1241. # Call frames for assertions or error messages.
  1242. type StackTrace extends object
  1243. properties
  1244. # String label of this stack trace. For async traces this may be a name of the function that
  1245. # initiated the async call.
  1246. optional string description
  1247. # JavaScript function name.
  1248. array of CallFrame callFrames
  1249. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1250. optional StackTrace parent
  1251. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1252. experimental optional StackTraceId parentId
  1253. # Unique identifier of current debugger.
  1254. experimental type UniqueDebuggerId extends string
  1255. # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
  1256. # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
  1257. experimental type StackTraceId extends object
  1258. properties
  1259. string id
  1260. optional UniqueDebuggerId debuggerId
  1261. # Add handler to promise with given promise object id.
  1262. command awaitPromise
  1263. parameters
  1264. # Identifier of the promise.
  1265. RemoteObjectId promiseObjectId
  1266. # Whether the result is expected to be a JSON object that should be sent by value.
  1267. optional boolean returnByValue
  1268. # Whether preview should be generated for the result.
  1269. optional boolean generatePreview
  1270. returns
  1271. # Promise result. Will contain rejected value if promise was rejected.
  1272. RemoteObject result
  1273. # Exception details if stack strace is available.
  1274. optional ExceptionDetails exceptionDetails
  1275. # Calls function with given declaration on the given object. Object group of the result is
  1276. # inherited from the target object.
  1277. command callFunctionOn
  1278. parameters
  1279. # Declaration of the function to call.
  1280. string functionDeclaration
  1281. # Identifier of the object to call function on. Either objectId or executionContextId should
  1282. # be specified.
  1283. optional RemoteObjectId objectId
  1284. # Call arguments. All call arguments must belong to the same JavaScript world as the target
  1285. # object.
  1286. optional array of CallArgument arguments
  1287. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1288. # execution. Overrides `setPauseOnException` state.
  1289. optional boolean silent
  1290. # Whether the result is expected to be a JSON object which should be sent by value.
  1291. # Can be overriden by `serializationOptions`.
  1292. optional boolean returnByValue
  1293. # Whether preview should be generated for the result.
  1294. experimental optional boolean generatePreview
  1295. # Whether execution should be treated as initiated by user in the UI.
  1296. optional boolean userGesture
  1297. # Whether execution should `await` for resulting value and return once awaited promise is
  1298. # resolved.
  1299. optional boolean awaitPromise
  1300. # Specifies execution context which global object will be used to call function on. Either
  1301. # executionContextId or objectId should be specified.
  1302. optional ExecutionContextId executionContextId
  1303. # Symbolic group name that can be used to release multiple objects. If objectGroup is not
  1304. # specified and objectId is, objectGroup will be inherited from object.
  1305. optional string objectGroup
  1306. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1307. experimental optional boolean throwOnSideEffect
  1308. # An alternative way to specify the execution context to call function on.
  1309. # Compared to contextId that may be reused across processes, this is guaranteed to be
  1310. # system-unique, so it can be used to prevent accidental function call
  1311. # in context different than intended (e.g. as a result of navigation across process
  1312. # boundaries).
  1313. # This is mutually exclusive with `executionContextId`.
  1314. experimental optional string uniqueContextId
  1315. # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
  1316. # Whether the result should contain `webDriverValue`, serialized according to
  1317. # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
  1318. # resulting `objectId` is still provided.
  1319. deprecated optional boolean generateWebDriverValue
  1320. # Specifies the result serialization. If provided, overrides
  1321. # `returnByValue` and `generateWebDriverValue`.
  1322. experimental optional SerializationOptions serializationOptions
  1323. returns
  1324. # Call result.
  1325. RemoteObject result
  1326. # Exception details.
  1327. optional ExceptionDetails exceptionDetails
  1328. # Compiles expression.
  1329. command compileScript
  1330. parameters
  1331. # Expression to compile.
  1332. string expression
  1333. # Source url to be set for the script.
  1334. string sourceURL
  1335. # Specifies whether the compiled script should be persisted.
  1336. boolean persistScript
  1337. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1338. # evaluation will be performed in the context of the inspected page.
  1339. optional ExecutionContextId executionContextId
  1340. returns
  1341. # Id of the script.
  1342. optional ScriptId scriptId
  1343. # Exception details.
  1344. optional ExceptionDetails exceptionDetails
  1345. # Disables reporting of execution contexts creation.
  1346. command disable
  1347. # Discards collected exceptions and console API calls.
  1348. command discardConsoleEntries
  1349. # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
  1350. # When the reporting gets enabled the event will be sent immediately for each existing execution
  1351. # context.
  1352. command enable
  1353. # Evaluates expression on global object.
  1354. command evaluate
  1355. parameters
  1356. # Expression to evaluate.
  1357. string expression
  1358. # Symbolic group name that can be used to release multiple objects.
  1359. optional string objectGroup
  1360. # Determines whether Command Line API should be available during the evaluation.
  1361. optional boolean includeCommandLineAPI
  1362. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1363. # execution. Overrides `setPauseOnException` state.
  1364. optional boolean silent
  1365. # Specifies in which execution context to perform evaluation. If the parameter is omitted the
  1366. # evaluation will be performed in the context of the inspected page.
  1367. # This is mutually exclusive with `uniqueContextId`, which offers an
  1368. # alternative way to identify the execution context that is more reliable
  1369. # in a multi-process environment.
  1370. optional ExecutionContextId contextId
  1371. # Whether the result is expected to be a JSON object that should be sent by value.
  1372. optional boolean returnByValue
  1373. # Whether preview should be generated for the result.
  1374. experimental optional boolean generatePreview
  1375. # Whether execution should be treated as initiated by user in the UI.
  1376. optional boolean userGesture
  1377. # Whether execution should `await` for resulting value and return once awaited promise is
  1378. # resolved.
  1379. optional boolean awaitPromise
  1380. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1381. # This implies `disableBreaks` below.
  1382. experimental optional boolean throwOnSideEffect
  1383. # Terminate execution after timing out (number of milliseconds).
  1384. experimental optional TimeDelta timeout
  1385. # Disable breakpoints during execution.
  1386. experimental optional boolean disableBreaks
  1387. # Setting this flag to true enables `let` re-declaration and top-level `await`.
  1388. # Note that `let` variables can only be re-declared if they originate from
  1389. # `replMode` themselves.
  1390. experimental optional boolean replMode
  1391. # The Content Security Policy (CSP) for the target might block 'unsafe-eval'
  1392. # which includes eval(), Function(), setTimeout() and setInterval()
  1393. # when called with non-callable arguments. This flag bypasses CSP for this
  1394. # evaluation and allows unsafe-eval. Defaults to true.
  1395. experimental optional boolean allowUnsafeEvalBlockedByCSP
  1396. # An alternative way to specify the execution context to evaluate in.
  1397. # Compared to contextId that may be reused across processes, this is guaranteed to be
  1398. # system-unique, so it can be used to prevent accidental evaluation of the expression
  1399. # in context different than intended (e.g. as a result of navigation across process
  1400. # boundaries).
  1401. # This is mutually exclusive with `contextId`.
  1402. experimental optional string uniqueContextId
  1403. # Deprecated. Use `serializationOptions: {serialization:"deep"}` instead.
  1404. # Whether the result should contain `webDriverValue`, serialized
  1405. # according to
  1406. # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
  1407. # resulting `objectId` is still provided.
  1408. deprecated optional boolean generateWebDriverValue
  1409. # Specifies the result serialization. If provided, overrides
  1410. # `returnByValue` and `generateWebDriverValue`.
  1411. experimental optional SerializationOptions serializationOptions
  1412. returns
  1413. # Evaluation result.
  1414. RemoteObject result
  1415. # Exception details.
  1416. optional ExceptionDetails exceptionDetails
  1417. # Returns the isolate id.
  1418. experimental command getIsolateId
  1419. returns
  1420. # The isolate id.
  1421. string id
  1422. # Returns the JavaScript heap usage.
  1423. # It is the total usage of the corresponding isolate not scoped to a particular Runtime.
  1424. experimental command getHeapUsage
  1425. returns
  1426. # Used heap size in bytes.
  1427. number usedSize
  1428. # Allocated heap size in bytes.
  1429. number totalSize
  1430. # Returns properties of a given object. Object group of the result is inherited from the target
  1431. # object.
  1432. command getProperties
  1433. parameters
  1434. # Identifier of the object to return properties for.
  1435. RemoteObjectId objectId
  1436. # If true, returns properties belonging only to the element itself, not to its prototype
  1437. # chain.
  1438. optional boolean ownProperties
  1439. # If true, returns accessor properties (with getter/setter) only; internal properties are not
  1440. # returned either.
  1441. experimental optional boolean accessorPropertiesOnly
  1442. # Whether preview should be generated for the results.
  1443. experimental optional boolean generatePreview
  1444. # If true, returns non-indexed properties only.
  1445. experimental optional boolean nonIndexedPropertiesOnly
  1446. returns
  1447. # Object properties.
  1448. array of PropertyDescriptor result
  1449. # Internal object properties (only of the element itself).
  1450. optional array of InternalPropertyDescriptor internalProperties
  1451. # Object private properties.
  1452. experimental optional array of PrivatePropertyDescriptor privateProperties
  1453. # Exception details.
  1454. optional ExceptionDetails exceptionDetails
  1455. # Returns all let, const and class variables from global scope.
  1456. command globalLexicalScopeNames
  1457. parameters
  1458. # Specifies in which execution context to lookup global scope variables.
  1459. optional ExecutionContextId executionContextId
  1460. returns
  1461. array of string names
  1462. command queryObjects
  1463. parameters
  1464. # Identifier of the prototype to return objects for.
  1465. RemoteObjectId prototypeObjectId
  1466. # Symbolic group name that can be used to release the results.
  1467. optional string objectGroup
  1468. returns
  1469. # Array with objects.
  1470. RemoteObject objects
  1471. # Releases remote object with given id.
  1472. command releaseObject
  1473. parameters
  1474. # Identifier of the object to release.
  1475. RemoteObjectId objectId
  1476. # Releases all remote objects that belong to a given group.
  1477. command releaseObjectGroup
  1478. parameters
  1479. # Symbolic object group name.
  1480. string objectGroup
  1481. # Tells inspected instance to run if it was waiting for debugger to attach.
  1482. command runIfWaitingForDebugger
  1483. # Runs script with given id in a given context.
  1484. command runScript
  1485. parameters
  1486. # Id of the script to run.
  1487. ScriptId scriptId
  1488. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1489. # evaluation will be performed in the context of the inspected page.
  1490. optional ExecutionContextId executionContextId
  1491. # Symbolic group name that can be used to release multiple objects.
  1492. optional string objectGroup
  1493. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1494. # execution. Overrides `setPauseOnException` state.
  1495. optional boolean silent
  1496. # Determines whether Command Line API should be available during the evaluation.
  1497. optional boolean includeCommandLineAPI
  1498. # Whether the result is expected to be a JSON object which should be sent by value.
  1499. optional boolean returnByValue
  1500. # Whether preview should be generated for the result.
  1501. optional boolean generatePreview
  1502. # Whether execution should `await` for resulting value and return once awaited promise is
  1503. # resolved.
  1504. optional boolean awaitPromise
  1505. returns
  1506. # Run result.
  1507. RemoteObject result
  1508. # Exception details.
  1509. optional ExceptionDetails exceptionDetails
  1510. # Enables or disables async call stacks tracking.
  1511. command setAsyncCallStackDepth
  1512. redirect Debugger
  1513. parameters
  1514. # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  1515. # call stacks (default).
  1516. integer maxDepth
  1517. experimental command setCustomObjectFormatterEnabled
  1518. parameters
  1519. boolean enabled
  1520. experimental command setMaxCallStackSizeToCapture
  1521. parameters
  1522. integer size
  1523. # Terminate current or next JavaScript execution.
  1524. # Will cancel the termination when the outer-most script execution ends.
  1525. experimental command terminateExecution
  1526. # If executionContextId is empty, adds binding with the given name on the
  1527. # global objects of all inspected contexts, including those created later,
  1528. # bindings survive reloads.
  1529. # Binding function takes exactly one argument, this argument should be string,
  1530. # in case of any other input, function throws an exception.
  1531. # Each binding function call produces Runtime.bindingCalled notification.
  1532. experimental command addBinding
  1533. parameters
  1534. string name
  1535. # If specified, the binding would only be exposed to the specified
  1536. # execution context. If omitted and `executionContextName` is not set,
  1537. # the binding is exposed to all execution contexts of the target.
  1538. # This parameter is mutually exclusive with `executionContextName`.
  1539. # Deprecated in favor of `executionContextName` due to an unclear use case
  1540. # and bugs in implementation (crbug.com/1169639). `executionContextId` will be
  1541. # removed in the future.
  1542. deprecated optional ExecutionContextId executionContextId
  1543. # If specified, the binding is exposed to the executionContext with
  1544. # matching name, even for contexts created after the binding is added.
  1545. # See also `ExecutionContext.name` and `worldName` parameter to
  1546. # `Page.addScriptToEvaluateOnNewDocument`.
  1547. # This parameter is mutually exclusive with `executionContextId`.
  1548. experimental optional string executionContextName
  1549. # This method does not remove binding function from global object but
  1550. # unsubscribes current runtime agent from Runtime.bindingCalled notifications.
  1551. experimental command removeBinding
  1552. parameters
  1553. string name
  1554. # This method tries to lookup and populate exception details for a
  1555. # JavaScript Error object.
  1556. # Note that the stackTrace portion of the resulting exceptionDetails will
  1557. # only be populated if the Runtime domain was enabled at the time when the
  1558. # Error was thrown.
  1559. experimental command getExceptionDetails
  1560. parameters
  1561. # The error object for which to resolve the exception details.
  1562. RemoteObjectId errorObjectId
  1563. returns
  1564. optional ExceptionDetails exceptionDetails
  1565. # Notification is issued every time when binding is called.
  1566. experimental event bindingCalled
  1567. parameters
  1568. string name
  1569. string payload
  1570. # Identifier of the context where the call was made.
  1571. ExecutionContextId executionContextId
  1572. # Issued when console API was called.
  1573. event consoleAPICalled
  1574. parameters
  1575. # Type of the call.
  1576. enum type
  1577. log
  1578. debug
  1579. info
  1580. error
  1581. warning
  1582. dir
  1583. dirxml
  1584. table
  1585. trace
  1586. clear
  1587. startGroup
  1588. startGroupCollapsed
  1589. endGroup
  1590. assert
  1591. profile
  1592. profileEnd
  1593. count
  1594. timeEnd
  1595. # Call arguments.
  1596. array of RemoteObject args
  1597. # Identifier of the context where the call was made.
  1598. ExecutionContextId executionContextId
  1599. # Call timestamp.
  1600. Timestamp timestamp
  1601. # Stack trace captured when the call was made. The async stack chain is automatically reported for
  1602. # the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
  1603. # chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
  1604. optional StackTrace stackTrace
  1605. # Console context descriptor for calls on non-default console context (not console.*):
  1606. # 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
  1607. # on named context.
  1608. experimental optional string context
  1609. # Issued when unhandled exception was revoked.
  1610. event exceptionRevoked
  1611. parameters
  1612. # Reason describing why exception was revoked.
  1613. string reason
  1614. # The id of revoked exception, as reported in `exceptionThrown`.
  1615. integer exceptionId
  1616. # Issued when exception was thrown and unhandled.
  1617. event exceptionThrown
  1618. parameters
  1619. # Timestamp of the exception.
  1620. Timestamp timestamp
  1621. ExceptionDetails exceptionDetails
  1622. # Issued when new execution context is created.
  1623. event executionContextCreated
  1624. parameters
  1625. # A newly created execution context.
  1626. ExecutionContextDescription context
  1627. # Issued when execution context is destroyed.
  1628. event executionContextDestroyed
  1629. parameters
  1630. # Id of the destroyed context
  1631. deprecated ExecutionContextId executionContextId
  1632. # Unique Id of the destroyed context
  1633. experimental string executionContextUniqueId
  1634. # Issued when all executionContexts were cleared in browser
  1635. event executionContextsCleared
  1636. # Issued when object should be inspected (for example, as a result of inspect() command line API
  1637. # call).
  1638. event inspectRequested
  1639. parameters
  1640. RemoteObject object
  1641. object hints
  1642. # Identifier of the context where the call was made.
  1643. experimental optional ExecutionContextId executionContextId
  1644. # This domain is deprecated.
  1645. deprecated domain Schema
  1646. # Description of the protocol domain.
  1647. type Domain extends object
  1648. properties
  1649. # Domain name.
  1650. string name
  1651. # Domain version.
  1652. string version
  1653. # Returns supported domains.
  1654. command getDomains
  1655. returns
  1656. # List of supported domains.
  1657. array of Domain domains