js_protocol.pdl 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785
  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 or
  419. # 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. uncaught
  426. all
  427. # Changes return value in top frame. Available only at return break position.
  428. experimental command setReturnValue
  429. parameters
  430. # New return value.
  431. Runtime.CallArgument newValue
  432. # Edits JavaScript source live.
  433. #
  434. # In general, functions that are currently on the stack can not be edited with
  435. # a single exception: If the edited function is the top-most stack frame and
  436. # that is the only activation of that function on the stack. In this case
  437. # the live edit will be successful and a `Debugger.restartFrame` for the
  438. # top-most function is automatically triggered.
  439. command setScriptSource
  440. parameters
  441. # Id of the script to edit.
  442. Runtime.ScriptId scriptId
  443. # New content of the script.
  444. string scriptSource
  445. # If true the change will not actually be applied. Dry run may be used to get result
  446. # description without actually modifying the code.
  447. optional boolean dryRun
  448. # If true, then `scriptSource` is allowed to change the function on top of the stack
  449. # as long as the top-most stack frame is the only activation of that function.
  450. experimental optional boolean allowTopFrameEditing
  451. returns
  452. # New stack trace in case editing has happened while VM was stopped.
  453. deprecated optional array of CallFrame callFrames
  454. # Whether current call stack was modified after applying the changes.
  455. deprecated optional boolean stackChanged
  456. # Async stack trace, if any.
  457. deprecated optional Runtime.StackTrace asyncStackTrace
  458. # Async stack trace, if any.
  459. deprecated optional Runtime.StackTraceId asyncStackTraceId
  460. # Whether the operation was successful or not. Only `Ok` denotes a
  461. # successful live edit while the other enum variants denote why
  462. # the live edit failed.
  463. experimental enum status
  464. Ok
  465. CompileError
  466. BlockedByActiveGenerator
  467. BlockedByActiveFunction
  468. # Exception details if any. Only present when `status` is `CompileError`.
  469. optional Runtime.ExceptionDetails exceptionDetails
  470. # Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  471. command setSkipAllPauses
  472. parameters
  473. # New value for skip pauses state.
  474. boolean skip
  475. # Changes value of variable in a callframe. Object-based scopes are not supported and must be
  476. # mutated manually.
  477. command setVariableValue
  478. parameters
  479. # 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
  480. # scope types are allowed. Other scopes could be manipulated manually.
  481. integer scopeNumber
  482. # Variable name.
  483. string variableName
  484. # New variable value.
  485. Runtime.CallArgument newValue
  486. # Id of callframe that holds variable.
  487. CallFrameId callFrameId
  488. # Steps into the function call.
  489. command stepInto
  490. parameters
  491. # Debugger will pause on the execution of the first async task which was scheduled
  492. # before next pause.
  493. experimental optional boolean breakOnAsyncCall
  494. # The skipList specifies location ranges that should be skipped on step into.
  495. experimental optional array of LocationRange skipList
  496. # Steps out of the function call.
  497. command stepOut
  498. # Steps over the statement.
  499. command stepOver
  500. parameters
  501. # The skipList specifies location ranges that should be skipped on step over.
  502. experimental optional array of LocationRange skipList
  503. # Fired when breakpoint is resolved to an actual script and location.
  504. event breakpointResolved
  505. parameters
  506. # Breakpoint unique identifier.
  507. BreakpointId breakpointId
  508. # Actual breakpoint location.
  509. Location location
  510. # Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  511. event paused
  512. parameters
  513. # Call stack the virtual machine stopped on.
  514. array of CallFrame callFrames
  515. # Pause reason.
  516. enum reason
  517. ambiguous
  518. assert
  519. CSPViolation
  520. debugCommand
  521. DOM
  522. EventListener
  523. exception
  524. instrumentation
  525. OOM
  526. other
  527. promiseRejection
  528. XHR
  529. # Object containing break-specific auxiliary properties.
  530. optional object data
  531. # Hit breakpoints IDs
  532. optional array of string hitBreakpoints
  533. # Async stack trace, if any.
  534. optional Runtime.StackTrace asyncStackTrace
  535. # Async stack trace, if any.
  536. experimental optional Runtime.StackTraceId asyncStackTraceId
  537. # Never present, will be removed.
  538. experimental deprecated optional Runtime.StackTraceId asyncCallStackTraceId
  539. # Fired when the virtual machine resumed execution.
  540. event resumed
  541. # Enum of possible script languages.
  542. type ScriptLanguage extends string
  543. enum
  544. JavaScript
  545. WebAssembly
  546. # Debug symbols available for a wasm script.
  547. type DebugSymbols extends object
  548. properties
  549. # Type of the debug symbols.
  550. enum type
  551. None
  552. SourceMap
  553. EmbeddedDWARF
  554. ExternalDWARF
  555. # URL of the external symbol source.
  556. optional string externalURL
  557. # Fired when virtual machine fails to parse the script.
  558. event scriptFailedToParse
  559. parameters
  560. # Identifier of the script parsed.
  561. Runtime.ScriptId scriptId
  562. # URL or name of the script parsed (if any).
  563. string url
  564. # Line offset of the script within the resource with given URL (for script tags).
  565. integer startLine
  566. # Column offset of the script within the resource with given URL.
  567. integer startColumn
  568. # Last line of the script.
  569. integer endLine
  570. # Length of the last line of the script.
  571. integer endColumn
  572. # Specifies script creation context.
  573. Runtime.ExecutionContextId executionContextId
  574. # Content hash of the script, SHA-256.
  575. string hash
  576. # Embedder-specific auxiliary data.
  577. optional object executionContextAuxData
  578. # URL of source map associated with script (if any).
  579. optional string sourceMapURL
  580. # True, if this script has sourceURL.
  581. optional boolean hasSourceURL
  582. # True, if this script is ES6 module.
  583. optional boolean isModule
  584. # This script length.
  585. optional integer length
  586. # JavaScript top stack frame of where the script parsed event was triggered if available.
  587. experimental optional Runtime.StackTrace stackTrace
  588. # If the scriptLanguage is WebAssembly, the code section offset in the module.
  589. experimental optional integer codeOffset
  590. # The language of the script.
  591. experimental optional Debugger.ScriptLanguage scriptLanguage
  592. # The name the embedder supplied for this script.
  593. experimental optional string embedderName
  594. # Fired when virtual machine parses script. This event is also fired for all known and uncollected
  595. # scripts upon enabling debugger.
  596. event scriptParsed
  597. parameters
  598. # Identifier of the script parsed.
  599. Runtime.ScriptId scriptId
  600. # URL or name of the script parsed (if any).
  601. string url
  602. # Line offset of the script within the resource with given URL (for script tags).
  603. integer startLine
  604. # Column offset of the script within the resource with given URL.
  605. integer startColumn
  606. # Last line of the script.
  607. integer endLine
  608. # Length of the last line of the script.
  609. integer endColumn
  610. # Specifies script creation context.
  611. Runtime.ExecutionContextId executionContextId
  612. # Content hash of the script, SHA-256.
  613. string hash
  614. # Embedder-specific auxiliary data.
  615. optional object executionContextAuxData
  616. # True, if this script is generated as a result of the live edit operation.
  617. experimental optional boolean isLiveEdit
  618. # URL of source map associated with script (if any).
  619. optional string sourceMapURL
  620. # True, if this script has sourceURL.
  621. optional boolean hasSourceURL
  622. # True, if this script is ES6 module.
  623. optional boolean isModule
  624. # This script length.
  625. optional integer length
  626. # JavaScript top stack frame of where the script parsed event was triggered if available.
  627. experimental optional Runtime.StackTrace stackTrace
  628. # If the scriptLanguage is WebAssembly, the code section offset in the module.
  629. experimental optional integer codeOffset
  630. # The language of the script.
  631. experimental optional Debugger.ScriptLanguage scriptLanguage
  632. # If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
  633. experimental optional Debugger.DebugSymbols debugSymbols
  634. # The name the embedder supplied for this script.
  635. experimental optional string embedderName
  636. experimental domain HeapProfiler
  637. depends on Runtime
  638. # Heap snapshot object id.
  639. type HeapSnapshotObjectId extends string
  640. # Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
  641. type SamplingHeapProfileNode extends object
  642. properties
  643. # Function location.
  644. Runtime.CallFrame callFrame
  645. # Allocations size in bytes for the node excluding children.
  646. number selfSize
  647. # Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
  648. integer id
  649. # Child nodes.
  650. array of SamplingHeapProfileNode children
  651. # A single sample from a sampling profile.
  652. type SamplingHeapProfileSample extends object
  653. properties
  654. # Allocation size in bytes attributed to the sample.
  655. number size
  656. # Id of the corresponding profile tree node.
  657. integer nodeId
  658. # Time-ordered sample ordinal number. It is unique across all profiles retrieved
  659. # between startSampling and stopSampling.
  660. number ordinal
  661. # Sampling profile.
  662. type SamplingHeapProfile extends object
  663. properties
  664. SamplingHeapProfileNode head
  665. array of SamplingHeapProfileSample samples
  666. # Enables console to refer to the node with given id via $x (see Command Line API for more details
  667. # $x functions).
  668. command addInspectedHeapObject
  669. parameters
  670. # Heap snapshot object id to be accessible by means of $x command line API.
  671. HeapSnapshotObjectId heapObjectId
  672. command collectGarbage
  673. command disable
  674. command enable
  675. command getHeapObjectId
  676. parameters
  677. # Identifier of the object to get heap object id for.
  678. Runtime.RemoteObjectId objectId
  679. returns
  680. # Id of the heap snapshot object corresponding to the passed remote object id.
  681. HeapSnapshotObjectId heapSnapshotObjectId
  682. command getObjectByHeapObjectId
  683. parameters
  684. HeapSnapshotObjectId objectId
  685. # Symbolic group name that can be used to release multiple objects.
  686. optional string objectGroup
  687. returns
  688. # Evaluation result.
  689. Runtime.RemoteObject result
  690. command getSamplingProfile
  691. returns
  692. # Return the sampling profile being collected.
  693. SamplingHeapProfile profile
  694. command startSampling
  695. parameters
  696. # Average sample interval in bytes. Poisson distribution is used for the intervals. The
  697. # default value is 32768 bytes.
  698. optional number samplingInterval
  699. command startTrackingHeapObjects
  700. parameters
  701. optional boolean trackAllocations
  702. command stopSampling
  703. returns
  704. # Recorded sampling heap profile.
  705. SamplingHeapProfile profile
  706. command stopTrackingHeapObjects
  707. parameters
  708. # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
  709. # when the tracking is stopped.
  710. optional boolean reportProgress
  711. # Deprecated in favor of `exposeInternals`.
  712. deprecated optional boolean treatGlobalObjectsAsRoots
  713. # If true, numerical values are included in the snapshot
  714. optional boolean captureNumericValue
  715. # If true, exposes internals of the snapshot.
  716. experimental optional boolean exposeInternals
  717. command takeHeapSnapshot
  718. parameters
  719. # If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
  720. optional boolean reportProgress
  721. # If true, a raw snapshot without artificial roots will be generated.
  722. # Deprecated in favor of `exposeInternals`.
  723. deprecated optional boolean treatGlobalObjectsAsRoots
  724. # If true, numerical values are included in the snapshot
  725. optional boolean captureNumericValue
  726. # If true, exposes internals of the snapshot.
  727. experimental optional boolean exposeInternals
  728. event addHeapSnapshotChunk
  729. parameters
  730. string chunk
  731. # If heap objects tracking has been started then backend may send update for one or more fragments
  732. event heapStatsUpdate
  733. parameters
  734. # An array of triplets. Each triplet describes a fragment. The first integer is the fragment
  735. # index, the second integer is a total count of objects for the fragment, the third integer is
  736. # a total size of the objects for the fragment.
  737. array of integer statsUpdate
  738. # If heap objects tracking has been started then backend regularly sends a current value for last
  739. # seen object id and corresponding timestamp. If the were changes in the heap since last event
  740. # then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  741. event lastSeenObjectId
  742. parameters
  743. integer lastSeenObjectId
  744. number timestamp
  745. event reportHeapSnapshotProgress
  746. parameters
  747. integer done
  748. integer total
  749. optional boolean finished
  750. event resetProfiles
  751. domain Profiler
  752. depends on Runtime
  753. depends on Debugger
  754. # Profile node. Holds callsite information, execution statistics and child nodes.
  755. type ProfileNode extends object
  756. properties
  757. # Unique id of the node.
  758. integer id
  759. # Function location.
  760. Runtime.CallFrame callFrame
  761. # Number of samples where this node was on top of the call stack.
  762. optional integer hitCount
  763. # Child node ids.
  764. optional array of integer children
  765. # The reason of being not optimized. The function may be deoptimized or marked as don't
  766. # optimize.
  767. optional string deoptReason
  768. # An array of source position ticks.
  769. optional array of PositionTickInfo positionTicks
  770. # Profile.
  771. type Profile extends object
  772. properties
  773. # The list of profile nodes. First item is the root node.
  774. array of ProfileNode nodes
  775. # Profiling start timestamp in microseconds.
  776. number startTime
  777. # Profiling end timestamp in microseconds.
  778. number endTime
  779. # Ids of samples top nodes.
  780. optional array of integer samples
  781. # Time intervals between adjacent samples in microseconds. The first delta is relative to the
  782. # profile startTime.
  783. optional array of integer timeDeltas
  784. # Specifies a number of samples attributed to a certain source position.
  785. type PositionTickInfo extends object
  786. properties
  787. # Source line number (1-based).
  788. integer line
  789. # Number of samples attributed to the source line.
  790. integer ticks
  791. # Coverage data for a source range.
  792. type CoverageRange extends object
  793. properties
  794. # JavaScript script source offset for the range start.
  795. integer startOffset
  796. # JavaScript script source offset for the range end.
  797. integer endOffset
  798. # Collected execution count of the source range.
  799. integer count
  800. # Coverage data for a JavaScript function.
  801. type FunctionCoverage extends object
  802. properties
  803. # JavaScript function name.
  804. string functionName
  805. # Source ranges inside the function with coverage data.
  806. array of CoverageRange ranges
  807. # Whether coverage data for this function has block granularity.
  808. boolean isBlockCoverage
  809. # Coverage data for a JavaScript script.
  810. type ScriptCoverage extends object
  811. properties
  812. # JavaScript script id.
  813. Runtime.ScriptId scriptId
  814. # JavaScript script name or url.
  815. string url
  816. # Functions contained in the script that has coverage data.
  817. array of FunctionCoverage functions
  818. # Describes a type collected during runtime.
  819. experimental type TypeObject extends object
  820. properties
  821. # Name of a type collected with type profiling.
  822. string name
  823. # Source offset and types for a parameter or return value.
  824. experimental type TypeProfileEntry extends object
  825. properties
  826. # Source offset of the parameter or end of function for return values.
  827. integer offset
  828. # The types for this parameter or return value.
  829. array of TypeObject types
  830. # Type profile data collected during runtime for a JavaScript script.
  831. experimental type ScriptTypeProfile extends object
  832. properties
  833. # JavaScript script id.
  834. Runtime.ScriptId scriptId
  835. # JavaScript script name or url.
  836. string url
  837. # Type profile entries for parameters and return values of the functions in the script.
  838. array of TypeProfileEntry entries
  839. command disable
  840. command enable
  841. # Collect coverage data for the current isolate. The coverage data may be incomplete due to
  842. # garbage collection.
  843. command getBestEffortCoverage
  844. returns
  845. # Coverage data for the current isolate.
  846. array of ScriptCoverage result
  847. # Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  848. command setSamplingInterval
  849. parameters
  850. # New sampling interval in microseconds.
  851. integer interval
  852. command start
  853. # Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
  854. # coverage may be incomplete. Enabling prevents running optimized code and resets execution
  855. # counters.
  856. command startPreciseCoverage
  857. parameters
  858. # Collect accurate call counts beyond simple 'covered' or 'not covered'.
  859. optional boolean callCount
  860. # Collect block-based coverage.
  861. optional boolean detailed
  862. # Allow the backend to send updates on its own initiative
  863. optional boolean allowTriggeredUpdates
  864. returns
  865. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  866. number timestamp
  867. # Enable type profile.
  868. experimental command startTypeProfile
  869. command stop
  870. returns
  871. # Recorded profile.
  872. Profile profile
  873. # Disable precise code coverage. Disabling releases unnecessary execution count records and allows
  874. # executing optimized code.
  875. command stopPreciseCoverage
  876. # Disable type profile. Disabling releases type profile data collected so far.
  877. experimental command stopTypeProfile
  878. # Collect coverage data for the current isolate, and resets execution counters. Precise code
  879. # coverage needs to have started.
  880. command takePreciseCoverage
  881. returns
  882. # Coverage data for the current isolate.
  883. array of ScriptCoverage result
  884. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  885. number timestamp
  886. # Collect type profile.
  887. experimental command takeTypeProfile
  888. returns
  889. # Type profile for all scripts since startTypeProfile() was turned on.
  890. array of ScriptTypeProfile result
  891. event consoleProfileFinished
  892. parameters
  893. string id
  894. # Location of console.profileEnd().
  895. Debugger.Location location
  896. Profile profile
  897. # Profile title passed as an argument to console.profile().
  898. optional string title
  899. # Sent when new profile recording is started using console.profile() call.
  900. event consoleProfileStarted
  901. parameters
  902. string id
  903. # Location of console.profile().
  904. Debugger.Location location
  905. # Profile title passed as an argument to console.profile().
  906. optional string title
  907. # Reports coverage delta since the last poll (either from an event like this, or from
  908. # `takePreciseCoverage` for the current isolate. May only be sent if precise code
  909. # coverage has been started. This event can be trigged by the embedder to, for example,
  910. # trigger collection of coverage data immediately at a certain point in time.
  911. experimental event preciseCoverageDeltaUpdate
  912. parameters
  913. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
  914. number timestamp
  915. # Identifier for distinguishing coverage events.
  916. string occasion
  917. # Coverage data for the current isolate.
  918. array of ScriptCoverage result
  919. # Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects.
  920. # Evaluation results are returned as mirror object that expose object type, string representation
  921. # and unique identifier that can be used for further object reference. Original objects are
  922. # maintained in memory unless they are either explicitly released or are released along with the
  923. # other objects in their object group.
  924. domain Runtime
  925. # Unique script identifier.
  926. type ScriptId extends string
  927. # Represents the value serialiazed by the WebDriver BiDi specification
  928. # https://w3c.github.io/webdriver-bidi.
  929. type WebDriverValue extends object
  930. properties
  931. enum type
  932. undefined
  933. null
  934. string
  935. number
  936. boolean
  937. bigint
  938. regexp
  939. date
  940. symbol
  941. array
  942. object
  943. function
  944. map
  945. set
  946. weakmap
  947. weakset
  948. error
  949. proxy
  950. promise
  951. typedarray
  952. arraybuffer
  953. node
  954. window
  955. optional any value
  956. optional string objectId
  957. # Unique object identifier.
  958. type RemoteObjectId extends string
  959. # Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
  960. # `-Infinity`, and bigint literals.
  961. type UnserializableValue extends string
  962. # Mirror object referencing original JavaScript object.
  963. type RemoteObject extends object
  964. properties
  965. # Object type.
  966. enum type
  967. object
  968. function
  969. undefined
  970. string
  971. number
  972. boolean
  973. symbol
  974. bigint
  975. # Object subtype hint. Specified for `object` type values only.
  976. # NOTE: If you change anything here, make sure to also update
  977. # `subtype` in `ObjectPreview` and `PropertyPreview` below.
  978. optional enum subtype
  979. array
  980. null
  981. node
  982. regexp
  983. date
  984. map
  985. set
  986. weakmap
  987. weakset
  988. iterator
  989. generator
  990. error
  991. proxy
  992. promise
  993. typedarray
  994. arraybuffer
  995. dataview
  996. webassemblymemory
  997. wasmvalue
  998. # Object class (constructor) name. Specified for `object` type values only.
  999. optional string className
  1000. # Remote object value in case of primitive values or JSON values (if it was requested).
  1001. optional any value
  1002. # Primitive value which can not be JSON-stringified does not have `value`, but gets this
  1003. # property.
  1004. optional UnserializableValue unserializableValue
  1005. # String representation of the object.
  1006. optional string description
  1007. # WebDriver BiDi representation of the value.
  1008. experimental optional WebDriverValue webDriverValue
  1009. # Unique object identifier (for non-primitive values).
  1010. optional RemoteObjectId objectId
  1011. # Preview containing abbreviated property values. Specified for `object` type values only.
  1012. experimental optional ObjectPreview preview
  1013. experimental optional CustomPreview customPreview
  1014. experimental type CustomPreview extends object
  1015. properties
  1016. # The JSON-stringified result of formatter.header(object, config) call.
  1017. # It contains json ML array that represents RemoteObject.
  1018. string header
  1019. # If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
  1020. # contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
  1021. # The result value is json ML array.
  1022. optional RemoteObjectId bodyGetterId
  1023. # Object containing abbreviated remote object value.
  1024. experimental type ObjectPreview extends object
  1025. properties
  1026. # Object type.
  1027. enum type
  1028. object
  1029. function
  1030. undefined
  1031. string
  1032. number
  1033. boolean
  1034. symbol
  1035. bigint
  1036. # Object subtype hint. Specified for `object` type values only.
  1037. optional enum subtype
  1038. array
  1039. null
  1040. node
  1041. regexp
  1042. date
  1043. map
  1044. set
  1045. weakmap
  1046. weakset
  1047. iterator
  1048. generator
  1049. error
  1050. proxy
  1051. promise
  1052. typedarray
  1053. arraybuffer
  1054. dataview
  1055. webassemblymemory
  1056. wasmvalue
  1057. # String representation of the object.
  1058. optional string description
  1059. # True iff some of the properties or entries of the original object did not fit.
  1060. boolean overflow
  1061. # List of the properties.
  1062. array of PropertyPreview properties
  1063. # List of the entries. Specified for `map` and `set` subtype values only.
  1064. optional array of EntryPreview entries
  1065. experimental type PropertyPreview extends object
  1066. properties
  1067. # Property name.
  1068. string name
  1069. # Object type. Accessor means that the property itself is an accessor property.
  1070. enum type
  1071. object
  1072. function
  1073. undefined
  1074. string
  1075. number
  1076. boolean
  1077. symbol
  1078. accessor
  1079. bigint
  1080. # User-friendly property value string.
  1081. optional string value
  1082. # Nested value preview.
  1083. optional ObjectPreview valuePreview
  1084. # Object subtype hint. Specified for `object` type values only.
  1085. optional enum subtype
  1086. array
  1087. null
  1088. node
  1089. regexp
  1090. date
  1091. map
  1092. set
  1093. weakmap
  1094. weakset
  1095. iterator
  1096. generator
  1097. error
  1098. proxy
  1099. promise
  1100. typedarray
  1101. arraybuffer
  1102. dataview
  1103. webassemblymemory
  1104. wasmvalue
  1105. experimental type EntryPreview extends object
  1106. properties
  1107. # Preview of the key. Specified for map-like collection entries.
  1108. optional ObjectPreview key
  1109. # Preview of the value.
  1110. ObjectPreview value
  1111. # Object property descriptor.
  1112. type PropertyDescriptor extends object
  1113. properties
  1114. # Property name or symbol description.
  1115. string name
  1116. # The value associated with the property.
  1117. optional RemoteObject value
  1118. # True if the value associated with the property may be changed (data descriptors only).
  1119. optional boolean writable
  1120. # A function which serves as a getter for the property, or `undefined` if there is no getter
  1121. # (accessor descriptors only).
  1122. optional RemoteObject get
  1123. # A function which serves as a setter for the property, or `undefined` if there is no setter
  1124. # (accessor descriptors only).
  1125. optional RemoteObject set
  1126. # True if the type of this property descriptor may be changed and if the property may be
  1127. # deleted from the corresponding object.
  1128. boolean configurable
  1129. # True if this property shows up during enumeration of the properties on the corresponding
  1130. # object.
  1131. boolean enumerable
  1132. # True if the result was thrown during the evaluation.
  1133. optional boolean wasThrown
  1134. # True if the property is owned for the object.
  1135. optional boolean isOwn
  1136. # Property symbol object, if the property is of the `symbol` type.
  1137. optional RemoteObject symbol
  1138. # Object internal property descriptor. This property isn't normally visible in JavaScript code.
  1139. type InternalPropertyDescriptor extends object
  1140. properties
  1141. # Conventional property name.
  1142. string name
  1143. # The value associated with the property.
  1144. optional RemoteObject value
  1145. # Object private field descriptor.
  1146. experimental type PrivatePropertyDescriptor extends object
  1147. properties
  1148. # Private property name.
  1149. string name
  1150. # The value associated with the private property.
  1151. optional RemoteObject value
  1152. # A function which serves as a getter for the private property,
  1153. # or `undefined` if there is no getter (accessor descriptors only).
  1154. optional RemoteObject get
  1155. # A function which serves as a setter for the private property,
  1156. # or `undefined` if there is no setter (accessor descriptors only).
  1157. optional RemoteObject set
  1158. # Represents function call argument. Either remote object id `objectId`, primitive `value`,
  1159. # unserializable primitive value or neither of (for undefined) them should be specified.
  1160. type CallArgument extends object
  1161. properties
  1162. # Primitive value or serializable javascript object.
  1163. optional any value
  1164. # Primitive value which can not be JSON-stringified.
  1165. optional UnserializableValue unserializableValue
  1166. # Remote object handle.
  1167. optional RemoteObjectId objectId
  1168. # Id of an execution context.
  1169. type ExecutionContextId extends integer
  1170. # Description of an isolated world.
  1171. type ExecutionContextDescription extends object
  1172. properties
  1173. # Unique id of the execution context. It can be used to specify in which execution context
  1174. # script evaluation should be performed.
  1175. ExecutionContextId id
  1176. # Execution context origin.
  1177. string origin
  1178. # Human readable name describing given context.
  1179. string name
  1180. # A system-unique execution context identifier. Unlike the id, this is unique across
  1181. # multiple processes, so can be reliably used to identify specific context while backend
  1182. # performs a cross-process navigation.
  1183. experimental string uniqueId
  1184. # Embedder-specific auxiliary data.
  1185. optional object auxData
  1186. # Detailed information about exception (or error) that was thrown during script compilation or
  1187. # execution.
  1188. type ExceptionDetails extends object
  1189. properties
  1190. # Exception id.
  1191. integer exceptionId
  1192. # Exception text, which should be used together with exception object when available.
  1193. string text
  1194. # Line number of the exception location (0-based).
  1195. integer lineNumber
  1196. # Column number of the exception location (0-based).
  1197. integer columnNumber
  1198. # Script ID of the exception location.
  1199. optional ScriptId scriptId
  1200. # URL of the exception location, to be used when the script was not reported.
  1201. optional string url
  1202. # JavaScript stack trace if available.
  1203. optional StackTrace stackTrace
  1204. # Exception object if available.
  1205. optional RemoteObject exception
  1206. # Identifier of the context where exception happened.
  1207. optional ExecutionContextId executionContextId
  1208. # Dictionary with entries of meta data that the client associated
  1209. # with this exception, such as information about associated network
  1210. # requests, etc.
  1211. experimental optional object exceptionMetaData
  1212. # Number of milliseconds since epoch.
  1213. type Timestamp extends number
  1214. # Number of milliseconds.
  1215. type TimeDelta extends number
  1216. # Stack entry for runtime errors and assertions.
  1217. type CallFrame extends object
  1218. properties
  1219. # JavaScript function name.
  1220. string functionName
  1221. # JavaScript script id.
  1222. ScriptId scriptId
  1223. # JavaScript script name or url.
  1224. string url
  1225. # JavaScript script line number (0-based).
  1226. integer lineNumber
  1227. # JavaScript script column number (0-based).
  1228. integer columnNumber
  1229. # Call frames for assertions or error messages.
  1230. type StackTrace extends object
  1231. properties
  1232. # String label of this stack trace. For async traces this may be a name of the function that
  1233. # initiated the async call.
  1234. optional string description
  1235. # JavaScript function name.
  1236. array of CallFrame callFrames
  1237. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1238. optional StackTrace parent
  1239. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1240. experimental optional StackTraceId parentId
  1241. # Unique identifier of current debugger.
  1242. experimental type UniqueDebuggerId extends string
  1243. # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
  1244. # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
  1245. experimental type StackTraceId extends object
  1246. properties
  1247. string id
  1248. optional UniqueDebuggerId debuggerId
  1249. # Add handler to promise with given promise object id.
  1250. command awaitPromise
  1251. parameters
  1252. # Identifier of the promise.
  1253. RemoteObjectId promiseObjectId
  1254. # Whether the result is expected to be a JSON object that should be sent by value.
  1255. optional boolean returnByValue
  1256. # Whether preview should be generated for the result.
  1257. optional boolean generatePreview
  1258. returns
  1259. # Promise result. Will contain rejected value if promise was rejected.
  1260. RemoteObject result
  1261. # Exception details if stack strace is available.
  1262. optional ExceptionDetails exceptionDetails
  1263. # Calls function with given declaration on the given object. Object group of the result is
  1264. # inherited from the target object.
  1265. command callFunctionOn
  1266. parameters
  1267. # Declaration of the function to call.
  1268. string functionDeclaration
  1269. # Identifier of the object to call function on. Either objectId or executionContextId should
  1270. # be specified.
  1271. optional RemoteObjectId objectId
  1272. # Call arguments. All call arguments must belong to the same JavaScript world as the target
  1273. # object.
  1274. optional array of CallArgument arguments
  1275. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1276. # execution. Overrides `setPauseOnException` state.
  1277. optional boolean silent
  1278. # Whether the result is expected to be a JSON object which should be sent by value.
  1279. optional boolean returnByValue
  1280. # Whether preview should be generated for the result.
  1281. experimental optional boolean generatePreview
  1282. # Whether execution should be treated as initiated by user in the UI.
  1283. optional boolean userGesture
  1284. # Whether execution should `await` for resulting value and return once awaited promise is
  1285. # resolved.
  1286. optional boolean awaitPromise
  1287. # Specifies execution context which global object will be used to call function on. Either
  1288. # executionContextId or objectId should be specified.
  1289. optional ExecutionContextId executionContextId
  1290. # Symbolic group name that can be used to release multiple objects. If objectGroup is not
  1291. # specified and objectId is, objectGroup will be inherited from object.
  1292. optional string objectGroup
  1293. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1294. experimental optional boolean throwOnSideEffect
  1295. # Whether the result should contain `webDriverValue`, serialized according to
  1296. # https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but
  1297. # resulting `objectId` is still provided.
  1298. experimental optional boolean generateWebDriverValue
  1299. returns
  1300. # Call result.
  1301. RemoteObject result
  1302. # Exception details.
  1303. optional ExceptionDetails exceptionDetails
  1304. # Compiles expression.
  1305. command compileScript
  1306. parameters
  1307. # Expression to compile.
  1308. string expression
  1309. # Source url to be set for the script.
  1310. string sourceURL
  1311. # Specifies whether the compiled script should be persisted.
  1312. boolean persistScript
  1313. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1314. # evaluation will be performed in the context of the inspected page.
  1315. optional ExecutionContextId executionContextId
  1316. returns
  1317. # Id of the script.
  1318. optional ScriptId scriptId
  1319. # Exception details.
  1320. optional ExceptionDetails exceptionDetails
  1321. # Disables reporting of execution contexts creation.
  1322. command disable
  1323. # Discards collected exceptions and console API calls.
  1324. command discardConsoleEntries
  1325. # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
  1326. # When the reporting gets enabled the event will be sent immediately for each existing execution
  1327. # context.
  1328. command enable
  1329. # Evaluates expression on global object.
  1330. command evaluate
  1331. parameters
  1332. # Expression to evaluate.
  1333. string expression
  1334. # Symbolic group name that can be used to release multiple objects.
  1335. optional string objectGroup
  1336. # Determines whether Command Line API should be available during the evaluation.
  1337. optional boolean includeCommandLineAPI
  1338. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1339. # execution. Overrides `setPauseOnException` state.
  1340. optional boolean silent
  1341. # Specifies in which execution context to perform evaluation. If the parameter is omitted the
  1342. # evaluation will be performed in the context of the inspected page.
  1343. # This is mutually exclusive with `uniqueContextId`, which offers an
  1344. # alternative way to identify the execution context that is more reliable
  1345. # in a multi-process environment.
  1346. optional ExecutionContextId contextId
  1347. # Whether the result is expected to be a JSON object that should be sent by value.
  1348. optional boolean returnByValue
  1349. # Whether preview should be generated for the result.
  1350. experimental optional boolean generatePreview
  1351. # Whether execution should be treated as initiated by user in the UI.
  1352. optional boolean userGesture
  1353. # Whether execution should `await` for resulting value and return once awaited promise is
  1354. # resolved.
  1355. optional boolean awaitPromise
  1356. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1357. # This implies `disableBreaks` below.
  1358. experimental optional boolean throwOnSideEffect
  1359. # Terminate execution after timing out (number of milliseconds).
  1360. experimental optional TimeDelta timeout
  1361. # Disable breakpoints during execution.
  1362. experimental optional boolean disableBreaks
  1363. # Setting this flag to true enables `let` re-declaration and top-level `await`.
  1364. # Note that `let` variables can only be re-declared if they originate from
  1365. # `replMode` themselves.
  1366. experimental optional boolean replMode
  1367. # The Content Security Policy (CSP) for the target might block 'unsafe-eval'
  1368. # which includes eval(), Function(), setTimeout() and setInterval()
  1369. # when called with non-callable arguments. This flag bypasses CSP for this
  1370. # evaluation and allows unsafe-eval. Defaults to true.
  1371. experimental optional boolean allowUnsafeEvalBlockedByCSP
  1372. # An alternative way to specify the execution context to evaluate in.
  1373. # Compared to contextId that may be reused across processes, this is guaranteed to be
  1374. # system-unique, so it can be used to prevent accidental evaluation of the expression
  1375. # in context different than intended (e.g. as a result of navigation across process
  1376. # boundaries).
  1377. # This is mutually exclusive with `contextId`.
  1378. experimental optional string uniqueContextId
  1379. # Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
  1380. experimental optional boolean generateWebDriverValue
  1381. returns
  1382. # Evaluation result.
  1383. RemoteObject result
  1384. # Exception details.
  1385. optional ExceptionDetails exceptionDetails
  1386. # Returns the isolate id.
  1387. experimental command getIsolateId
  1388. returns
  1389. # The isolate id.
  1390. string id
  1391. # Returns the JavaScript heap usage.
  1392. # It is the total usage of the corresponding isolate not scoped to a particular Runtime.
  1393. experimental command getHeapUsage
  1394. returns
  1395. # Used heap size in bytes.
  1396. number usedSize
  1397. # Allocated heap size in bytes.
  1398. number totalSize
  1399. # Returns properties of a given object. Object group of the result is inherited from the target
  1400. # object.
  1401. command getProperties
  1402. parameters
  1403. # Identifier of the object to return properties for.
  1404. RemoteObjectId objectId
  1405. # If true, returns properties belonging only to the element itself, not to its prototype
  1406. # chain.
  1407. optional boolean ownProperties
  1408. # If true, returns accessor properties (with getter/setter) only; internal properties are not
  1409. # returned either.
  1410. experimental optional boolean accessorPropertiesOnly
  1411. # Whether preview should be generated for the results.
  1412. experimental optional boolean generatePreview
  1413. # If true, returns non-indexed properties only.
  1414. experimental optional boolean nonIndexedPropertiesOnly
  1415. returns
  1416. # Object properties.
  1417. array of PropertyDescriptor result
  1418. # Internal object properties (only of the element itself).
  1419. optional array of InternalPropertyDescriptor internalProperties
  1420. # Object private properties.
  1421. experimental optional array of PrivatePropertyDescriptor privateProperties
  1422. # Exception details.
  1423. optional ExceptionDetails exceptionDetails
  1424. # Returns all let, const and class variables from global scope.
  1425. command globalLexicalScopeNames
  1426. parameters
  1427. # Specifies in which execution context to lookup global scope variables.
  1428. optional ExecutionContextId executionContextId
  1429. returns
  1430. array of string names
  1431. command queryObjects
  1432. parameters
  1433. # Identifier of the prototype to return objects for.
  1434. RemoteObjectId prototypeObjectId
  1435. # Symbolic group name that can be used to release the results.
  1436. optional string objectGroup
  1437. returns
  1438. # Array with objects.
  1439. RemoteObject objects
  1440. # Releases remote object with given id.
  1441. command releaseObject
  1442. parameters
  1443. # Identifier of the object to release.
  1444. RemoteObjectId objectId
  1445. # Releases all remote objects that belong to a given group.
  1446. command releaseObjectGroup
  1447. parameters
  1448. # Symbolic object group name.
  1449. string objectGroup
  1450. # Tells inspected instance to run if it was waiting for debugger to attach.
  1451. command runIfWaitingForDebugger
  1452. # Runs script with given id in a given context.
  1453. command runScript
  1454. parameters
  1455. # Id of the script to run.
  1456. ScriptId scriptId
  1457. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1458. # evaluation will be performed in the context of the inspected page.
  1459. optional ExecutionContextId executionContextId
  1460. # Symbolic group name that can be used to release multiple objects.
  1461. optional string objectGroup
  1462. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1463. # execution. Overrides `setPauseOnException` state.
  1464. optional boolean silent
  1465. # Determines whether Command Line API should be available during the evaluation.
  1466. optional boolean includeCommandLineAPI
  1467. # Whether the result is expected to be a JSON object which should be sent by value.
  1468. optional boolean returnByValue
  1469. # Whether preview should be generated for the result.
  1470. optional boolean generatePreview
  1471. # Whether execution should `await` for resulting value and return once awaited promise is
  1472. # resolved.
  1473. optional boolean awaitPromise
  1474. returns
  1475. # Run result.
  1476. RemoteObject result
  1477. # Exception details.
  1478. optional ExceptionDetails exceptionDetails
  1479. # Enables or disables async call stacks tracking.
  1480. command setAsyncCallStackDepth
  1481. redirect Debugger
  1482. parameters
  1483. # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  1484. # call stacks (default).
  1485. integer maxDepth
  1486. experimental command setCustomObjectFormatterEnabled
  1487. parameters
  1488. boolean enabled
  1489. experimental command setMaxCallStackSizeToCapture
  1490. parameters
  1491. integer size
  1492. # Terminate current or next JavaScript execution.
  1493. # Will cancel the termination when the outer-most script execution ends.
  1494. experimental command terminateExecution
  1495. # If executionContextId is empty, adds binding with the given name on the
  1496. # global objects of all inspected contexts, including those created later,
  1497. # bindings survive reloads.
  1498. # Binding function takes exactly one argument, this argument should be string,
  1499. # in case of any other input, function throws an exception.
  1500. # Each binding function call produces Runtime.bindingCalled notification.
  1501. experimental command addBinding
  1502. parameters
  1503. string name
  1504. # If specified, the binding would only be exposed to the specified
  1505. # execution context. If omitted and `executionContextName` is not set,
  1506. # the binding is exposed to all execution contexts of the target.
  1507. # This parameter is mutually exclusive with `executionContextName`.
  1508. # Deprecated in favor of `executionContextName` due to an unclear use case
  1509. # and bugs in implementation (crbug.com/1169639). `executionContextId` will be
  1510. # removed in the future.
  1511. deprecated optional ExecutionContextId executionContextId
  1512. # If specified, the binding is exposed to the executionContext with
  1513. # matching name, even for contexts created after the binding is added.
  1514. # See also `ExecutionContext.name` and `worldName` parameter to
  1515. # `Page.addScriptToEvaluateOnNewDocument`.
  1516. # This parameter is mutually exclusive with `executionContextId`.
  1517. experimental optional string executionContextName
  1518. # This method does not remove binding function from global object but
  1519. # unsubscribes current runtime agent from Runtime.bindingCalled notifications.
  1520. experimental command removeBinding
  1521. parameters
  1522. string name
  1523. # This method tries to lookup and populate exception details for a
  1524. # JavaScript Error object.
  1525. # Note that the stackTrace portion of the resulting exceptionDetails will
  1526. # only be populated if the Runtime domain was enabled at the time when the
  1527. # Error was thrown.
  1528. experimental command getExceptionDetails
  1529. parameters
  1530. # The error object for which to resolve the exception details.
  1531. RemoteObjectId errorObjectId
  1532. returns
  1533. optional ExceptionDetails exceptionDetails
  1534. # Notification is issued every time when binding is called.
  1535. experimental event bindingCalled
  1536. parameters
  1537. string name
  1538. string payload
  1539. # Identifier of the context where the call was made.
  1540. ExecutionContextId executionContextId
  1541. # Issued when console API was called.
  1542. event consoleAPICalled
  1543. parameters
  1544. # Type of the call.
  1545. enum type
  1546. log
  1547. debug
  1548. info
  1549. error
  1550. warning
  1551. dir
  1552. dirxml
  1553. table
  1554. trace
  1555. clear
  1556. startGroup
  1557. startGroupCollapsed
  1558. endGroup
  1559. assert
  1560. profile
  1561. profileEnd
  1562. count
  1563. timeEnd
  1564. # Call arguments.
  1565. array of RemoteObject args
  1566. # Identifier of the context where the call was made.
  1567. ExecutionContextId executionContextId
  1568. # Call timestamp.
  1569. Timestamp timestamp
  1570. # Stack trace captured when the call was made. The async stack chain is automatically reported for
  1571. # the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
  1572. # chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
  1573. optional StackTrace stackTrace
  1574. # Console context descriptor for calls on non-default console context (not console.*):
  1575. # 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
  1576. # on named context.
  1577. experimental optional string context
  1578. # Issued when unhandled exception was revoked.
  1579. event exceptionRevoked
  1580. parameters
  1581. # Reason describing why exception was revoked.
  1582. string reason
  1583. # The id of revoked exception, as reported in `exceptionThrown`.
  1584. integer exceptionId
  1585. # Issued when exception was thrown and unhandled.
  1586. event exceptionThrown
  1587. parameters
  1588. # Timestamp of the exception.
  1589. Timestamp timestamp
  1590. ExceptionDetails exceptionDetails
  1591. # Issued when new execution context is created.
  1592. event executionContextCreated
  1593. parameters
  1594. # A newly created execution context.
  1595. ExecutionContextDescription context
  1596. # Issued when execution context is destroyed.
  1597. event executionContextDestroyed
  1598. parameters
  1599. # Id of the destroyed context
  1600. ExecutionContextId executionContextId
  1601. # Issued when all executionContexts were cleared in browser
  1602. event executionContextsCleared
  1603. # Issued when object should be inspected (for example, as a result of inspect() command line API
  1604. # call).
  1605. event inspectRequested
  1606. parameters
  1607. RemoteObject object
  1608. object hints
  1609. # Identifier of the context where the call was made.
  1610. experimental optional ExecutionContextId executionContextId
  1611. # This domain is deprecated.
  1612. deprecated domain Schema
  1613. # Description of the protocol domain.
  1614. type Domain extends object
  1615. properties
  1616. # Domain name.
  1617. string name
  1618. # Domain version.
  1619. string version
  1620. # Returns supported domains.
  1621. command getDomains
  1622. returns
  1623. # List of supported domains.
  1624. array of Domain domains