js_protocol.pdl 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806
  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` and `returnByValue`.
  917. type SerializationOptions extends object
  918. properties
  919. enum serialization
  920. # Whether the result should be deep-serialized. The result is put into
  921. # `deepSerializedValue` and `ObjectId` is provided.
  922. deep
  923. # Whether the result is expected to be a JSON object which should be sent by value.
  924. # The result is put either into `value` or into `unserializableValue`. Synonym of
  925. # `returnByValue: true`. Overrides `returnByValue`.
  926. json
  927. # Only remote object id is put in the result. Same bahaviour as if no
  928. # `serializationOptions`, `generatePreview` nor `returnByValue` are provided.
  929. idOnly
  930. # Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode.
  931. optional integer maxDepth
  932. # Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM
  933. # serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`.
  934. # Values can be only of type string or integer.
  935. optional object additionalParameters
  936. # Represents deep serialized value.
  937. type DeepSerializedValue extends object
  938. properties
  939. enum type
  940. undefined
  941. null
  942. string
  943. number
  944. boolean
  945. bigint
  946. regexp
  947. date
  948. symbol
  949. array
  950. object
  951. function
  952. map
  953. set
  954. weakmap
  955. weakset
  956. error
  957. proxy
  958. promise
  959. typedarray
  960. arraybuffer
  961. node
  962. window
  963. generator
  964. optional any value
  965. optional string objectId
  966. # Set if value reference met more then once during serialization. In such
  967. # case, value is provided only to one of the serialized values. Unique
  968. # per value in the scope of one CDP call.
  969. optional integer weakLocalObjectReference
  970. # Unique object identifier.
  971. type RemoteObjectId extends string
  972. # Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
  973. # `-Infinity`, and bigint literals.
  974. type UnserializableValue extends string
  975. # Mirror object referencing original JavaScript object.
  976. type RemoteObject extends object
  977. properties
  978. # Object type.
  979. enum type
  980. object
  981. function
  982. undefined
  983. string
  984. number
  985. boolean
  986. symbol
  987. bigint
  988. # Object subtype hint. Specified for `object` type values only.
  989. # NOTE: If you change anything here, make sure to also update
  990. # `subtype` in `ObjectPreview` and `PropertyPreview` below.
  991. optional enum subtype
  992. array
  993. null
  994. node
  995. regexp
  996. date
  997. map
  998. set
  999. weakmap
  1000. weakset
  1001. iterator
  1002. generator
  1003. error
  1004. proxy
  1005. promise
  1006. typedarray
  1007. arraybuffer
  1008. dataview
  1009. webassemblymemory
  1010. wasmvalue
  1011. # Object class (constructor) name. Specified for `object` type values only.
  1012. optional string className
  1013. # Remote object value in case of primitive values or JSON values (if it was requested).
  1014. optional any value
  1015. # Primitive value which can not be JSON-stringified does not have `value`, but gets this
  1016. # property.
  1017. optional UnserializableValue unserializableValue
  1018. # String representation of the object.
  1019. optional string description
  1020. # Deep serialized value.
  1021. experimental optional DeepSerializedValue deepSerializedValue
  1022. # Unique object identifier (for non-primitive values).
  1023. optional RemoteObjectId objectId
  1024. # Preview containing abbreviated property values. Specified for `object` type values only.
  1025. experimental optional ObjectPreview preview
  1026. experimental optional CustomPreview customPreview
  1027. experimental type CustomPreview extends object
  1028. properties
  1029. # The JSON-stringified result of formatter.header(object, config) call.
  1030. # It contains json ML array that represents RemoteObject.
  1031. string header
  1032. # If formatter returns true as a result of formatter.hasBody call then bodyGetterId will
  1033. # contain RemoteObjectId for the function that returns result of formatter.body(object, config) call.
  1034. # The result value is json ML array.
  1035. optional RemoteObjectId bodyGetterId
  1036. # Object containing abbreviated remote object value.
  1037. experimental type ObjectPreview extends object
  1038. properties
  1039. # Object type.
  1040. enum type
  1041. object
  1042. function
  1043. undefined
  1044. string
  1045. number
  1046. boolean
  1047. symbol
  1048. bigint
  1049. # Object subtype hint. Specified for `object` type values only.
  1050. optional enum subtype
  1051. array
  1052. null
  1053. node
  1054. regexp
  1055. date
  1056. map
  1057. set
  1058. weakmap
  1059. weakset
  1060. iterator
  1061. generator
  1062. error
  1063. proxy
  1064. promise
  1065. typedarray
  1066. arraybuffer
  1067. dataview
  1068. webassemblymemory
  1069. wasmvalue
  1070. # String representation of the object.
  1071. optional string description
  1072. # True iff some of the properties or entries of the original object did not fit.
  1073. boolean overflow
  1074. # List of the properties.
  1075. array of PropertyPreview properties
  1076. # List of the entries. Specified for `map` and `set` subtype values only.
  1077. optional array of EntryPreview entries
  1078. experimental type PropertyPreview extends object
  1079. properties
  1080. # Property name.
  1081. string name
  1082. # Object type. Accessor means that the property itself is an accessor property.
  1083. enum type
  1084. object
  1085. function
  1086. undefined
  1087. string
  1088. number
  1089. boolean
  1090. symbol
  1091. accessor
  1092. bigint
  1093. # User-friendly property value string.
  1094. optional string value
  1095. # Nested value preview.
  1096. optional ObjectPreview valuePreview
  1097. # Object subtype hint. Specified for `object` type values only.
  1098. optional enum subtype
  1099. array
  1100. null
  1101. node
  1102. regexp
  1103. date
  1104. map
  1105. set
  1106. weakmap
  1107. weakset
  1108. iterator
  1109. generator
  1110. error
  1111. proxy
  1112. promise
  1113. typedarray
  1114. arraybuffer
  1115. dataview
  1116. webassemblymemory
  1117. wasmvalue
  1118. experimental type EntryPreview extends object
  1119. properties
  1120. # Preview of the key. Specified for map-like collection entries.
  1121. optional ObjectPreview key
  1122. # Preview of the value.
  1123. ObjectPreview value
  1124. # Object property descriptor.
  1125. type PropertyDescriptor extends object
  1126. properties
  1127. # Property name or symbol description.
  1128. string name
  1129. # The value associated with the property.
  1130. optional RemoteObject value
  1131. # True if the value associated with the property may be changed (data descriptors only).
  1132. optional boolean writable
  1133. # A function which serves as a getter for the property, or `undefined` if there is no getter
  1134. # (accessor descriptors only).
  1135. optional RemoteObject get
  1136. # A function which serves as a setter for the property, or `undefined` if there is no setter
  1137. # (accessor descriptors only).
  1138. optional RemoteObject set
  1139. # True if the type of this property descriptor may be changed and if the property may be
  1140. # deleted from the corresponding object.
  1141. boolean configurable
  1142. # True if this property shows up during enumeration of the properties on the corresponding
  1143. # object.
  1144. boolean enumerable
  1145. # True if the result was thrown during the evaluation.
  1146. optional boolean wasThrown
  1147. # True if the property is owned for the object.
  1148. optional boolean isOwn
  1149. # Property symbol object, if the property is of the `symbol` type.
  1150. optional RemoteObject symbol
  1151. # Object internal property descriptor. This property isn't normally visible in JavaScript code.
  1152. type InternalPropertyDescriptor extends object
  1153. properties
  1154. # Conventional property name.
  1155. string name
  1156. # The value associated with the property.
  1157. optional RemoteObject value
  1158. # Object private field descriptor.
  1159. experimental type PrivatePropertyDescriptor extends object
  1160. properties
  1161. # Private property name.
  1162. string name
  1163. # The value associated with the private property.
  1164. optional RemoteObject value
  1165. # A function which serves as a getter for the private property,
  1166. # or `undefined` if there is no getter (accessor descriptors only).
  1167. optional RemoteObject get
  1168. # A function which serves as a setter for the private property,
  1169. # or `undefined` if there is no setter (accessor descriptors only).
  1170. optional RemoteObject set
  1171. # Represents function call argument. Either remote object id `objectId`, primitive `value`,
  1172. # unserializable primitive value or neither of (for undefined) them should be specified.
  1173. type CallArgument extends object
  1174. properties
  1175. # Primitive value or serializable javascript object.
  1176. optional any value
  1177. # Primitive value which can not be JSON-stringified.
  1178. optional UnserializableValue unserializableValue
  1179. # Remote object handle.
  1180. optional RemoteObjectId objectId
  1181. # Id of an execution context.
  1182. type ExecutionContextId extends integer
  1183. # Description of an isolated world.
  1184. type ExecutionContextDescription extends object
  1185. properties
  1186. # Unique id of the execution context. It can be used to specify in which execution context
  1187. # script evaluation should be performed.
  1188. ExecutionContextId id
  1189. # Execution context origin.
  1190. string origin
  1191. # Human readable name describing given context.
  1192. string name
  1193. # A system-unique execution context identifier. Unlike the id, this is unique across
  1194. # multiple processes, so can be reliably used to identify specific context while backend
  1195. # performs a cross-process navigation.
  1196. experimental string uniqueId
  1197. # Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
  1198. optional object auxData
  1199. # Detailed information about exception (or error) that was thrown during script compilation or
  1200. # execution.
  1201. type ExceptionDetails extends object
  1202. properties
  1203. # Exception id.
  1204. integer exceptionId
  1205. # Exception text, which should be used together with exception object when available.
  1206. string text
  1207. # Line number of the exception location (0-based).
  1208. integer lineNumber
  1209. # Column number of the exception location (0-based).
  1210. integer columnNumber
  1211. # Script ID of the exception location.
  1212. optional ScriptId scriptId
  1213. # URL of the exception location, to be used when the script was not reported.
  1214. optional string url
  1215. # JavaScript stack trace if available.
  1216. optional StackTrace stackTrace
  1217. # Exception object if available.
  1218. optional RemoteObject exception
  1219. # Identifier of the context where exception happened.
  1220. optional ExecutionContextId executionContextId
  1221. # Dictionary with entries of meta data that the client associated
  1222. # with this exception, such as information about associated network
  1223. # requests, etc.
  1224. experimental optional object exceptionMetaData
  1225. # Number of milliseconds since epoch.
  1226. type Timestamp extends number
  1227. # Number of milliseconds.
  1228. type TimeDelta extends number
  1229. # Stack entry for runtime errors and assertions.
  1230. type CallFrame extends object
  1231. properties
  1232. # JavaScript function name.
  1233. string functionName
  1234. # JavaScript script id.
  1235. ScriptId scriptId
  1236. # JavaScript script name or url.
  1237. string url
  1238. # JavaScript script line number (0-based).
  1239. integer lineNumber
  1240. # JavaScript script column number (0-based).
  1241. integer columnNumber
  1242. # Call frames for assertions or error messages.
  1243. type StackTrace extends object
  1244. properties
  1245. # String label of this stack trace. For async traces this may be a name of the function that
  1246. # initiated the async call.
  1247. optional string description
  1248. # JavaScript function name.
  1249. array of CallFrame callFrames
  1250. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1251. optional StackTrace parent
  1252. # Asynchronous JavaScript stack trace that preceded this stack, if available.
  1253. experimental optional StackTraceId parentId
  1254. # Unique identifier of current debugger.
  1255. experimental type UniqueDebuggerId extends string
  1256. # If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
  1257. # allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
  1258. experimental type StackTraceId extends object
  1259. properties
  1260. string id
  1261. optional UniqueDebuggerId debuggerId
  1262. # Add handler to promise with given promise object id.
  1263. command awaitPromise
  1264. parameters
  1265. # Identifier of the promise.
  1266. RemoteObjectId promiseObjectId
  1267. # Whether the result is expected to be a JSON object that should be sent by value.
  1268. optional boolean returnByValue
  1269. # Whether preview should be generated for the result.
  1270. optional boolean generatePreview
  1271. returns
  1272. # Promise result. Will contain rejected value if promise was rejected.
  1273. RemoteObject result
  1274. # Exception details if stack strace is available.
  1275. optional ExceptionDetails exceptionDetails
  1276. # Calls function with given declaration on the given object. Object group of the result is
  1277. # inherited from the target object.
  1278. command callFunctionOn
  1279. parameters
  1280. # Declaration of the function to call.
  1281. string functionDeclaration
  1282. # Identifier of the object to call function on. Either objectId or executionContextId should
  1283. # be specified.
  1284. optional RemoteObjectId objectId
  1285. # Call arguments. All call arguments must belong to the same JavaScript world as the target
  1286. # object.
  1287. optional array of CallArgument arguments
  1288. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1289. # execution. Overrides `setPauseOnException` state.
  1290. optional boolean silent
  1291. # Whether the result is expected to be a JSON object which should be sent by value.
  1292. # Can be overriden by `serializationOptions`.
  1293. optional boolean returnByValue
  1294. # Whether preview should be generated for the result.
  1295. experimental optional boolean generatePreview
  1296. # Whether execution should be treated as initiated by user in the UI.
  1297. optional boolean userGesture
  1298. # Whether execution should `await` for resulting value and return once awaited promise is
  1299. # resolved.
  1300. optional boolean awaitPromise
  1301. # Specifies execution context which global object will be used to call function on. Either
  1302. # executionContextId or objectId should be specified.
  1303. optional ExecutionContextId executionContextId
  1304. # Symbolic group name that can be used to release multiple objects. If objectGroup is not
  1305. # specified and objectId is, objectGroup will be inherited from object.
  1306. optional string objectGroup
  1307. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1308. experimental optional boolean throwOnSideEffect
  1309. # An alternative way to specify the execution context to call function on.
  1310. # Compared to contextId that may be reused across processes, this is guaranteed to be
  1311. # system-unique, so it can be used to prevent accidental function call
  1312. # in context different than intended (e.g. as a result of navigation across process
  1313. # boundaries).
  1314. # This is mutually exclusive with `executionContextId`.
  1315. experimental optional string uniqueContextId
  1316. # Specifies the result serialization. If provided, overrides
  1317. # `generatePreview` and `returnByValue`.
  1318. experimental optional SerializationOptions serializationOptions
  1319. returns
  1320. # Call result.
  1321. RemoteObject result
  1322. # Exception details.
  1323. optional ExceptionDetails exceptionDetails
  1324. # Compiles expression.
  1325. command compileScript
  1326. parameters
  1327. # Expression to compile.
  1328. string expression
  1329. # Source url to be set for the script.
  1330. string sourceURL
  1331. # Specifies whether the compiled script should be persisted.
  1332. boolean persistScript
  1333. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1334. # evaluation will be performed in the context of the inspected page.
  1335. optional ExecutionContextId executionContextId
  1336. returns
  1337. # Id of the script.
  1338. optional ScriptId scriptId
  1339. # Exception details.
  1340. optional ExceptionDetails exceptionDetails
  1341. # Disables reporting of execution contexts creation.
  1342. command disable
  1343. # Discards collected exceptions and console API calls.
  1344. command discardConsoleEntries
  1345. # Enables reporting of execution contexts creation by means of `executionContextCreated` event.
  1346. # When the reporting gets enabled the event will be sent immediately for each existing execution
  1347. # context.
  1348. command enable
  1349. # Evaluates expression on global object.
  1350. command evaluate
  1351. parameters
  1352. # Expression to evaluate.
  1353. string expression
  1354. # Symbolic group name that can be used to release multiple objects.
  1355. optional string objectGroup
  1356. # Determines whether Command Line API should be available during the evaluation.
  1357. optional boolean includeCommandLineAPI
  1358. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1359. # execution. Overrides `setPauseOnException` state.
  1360. optional boolean silent
  1361. # Specifies in which execution context to perform evaluation. If the parameter is omitted the
  1362. # evaluation will be performed in the context of the inspected page.
  1363. # This is mutually exclusive with `uniqueContextId`, which offers an
  1364. # alternative way to identify the execution context that is more reliable
  1365. # in a multi-process environment.
  1366. optional ExecutionContextId contextId
  1367. # Whether the result is expected to be a JSON object that should be sent by value.
  1368. optional boolean returnByValue
  1369. # Whether preview should be generated for the result.
  1370. experimental optional boolean generatePreview
  1371. # Whether execution should be treated as initiated by user in the UI.
  1372. optional boolean userGesture
  1373. # Whether execution should `await` for resulting value and return once awaited promise is
  1374. # resolved.
  1375. optional boolean awaitPromise
  1376. # Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1377. # This implies `disableBreaks` below.
  1378. experimental optional boolean throwOnSideEffect
  1379. # Terminate execution after timing out (number of milliseconds).
  1380. experimental optional TimeDelta timeout
  1381. # Disable breakpoints during execution.
  1382. experimental optional boolean disableBreaks
  1383. # Setting this flag to true enables `let` re-declaration and top-level `await`.
  1384. # Note that `let` variables can only be re-declared if they originate from
  1385. # `replMode` themselves.
  1386. experimental optional boolean replMode
  1387. # The Content Security Policy (CSP) for the target might block 'unsafe-eval'
  1388. # which includes eval(), Function(), setTimeout() and setInterval()
  1389. # when called with non-callable arguments. This flag bypasses CSP for this
  1390. # evaluation and allows unsafe-eval. Defaults to true.
  1391. experimental optional boolean allowUnsafeEvalBlockedByCSP
  1392. # An alternative way to specify the execution context to evaluate in.
  1393. # Compared to contextId that may be reused across processes, this is guaranteed to be
  1394. # system-unique, so it can be used to prevent accidental evaluation of the expression
  1395. # in context different than intended (e.g. as a result of navigation across process
  1396. # boundaries).
  1397. # This is mutually exclusive with `contextId`.
  1398. experimental optional string uniqueContextId
  1399. # Specifies the result serialization. If provided, overrides
  1400. # `generatePreview` and `returnByValue`.
  1401. experimental optional SerializationOptions serializationOptions
  1402. returns
  1403. # Evaluation result.
  1404. RemoteObject result
  1405. # Exception details.
  1406. optional ExceptionDetails exceptionDetails
  1407. # Returns the isolate id.
  1408. experimental command getIsolateId
  1409. returns
  1410. # The isolate id.
  1411. string id
  1412. # Returns the JavaScript heap usage.
  1413. # It is the total usage of the corresponding isolate not scoped to a particular Runtime.
  1414. experimental command getHeapUsage
  1415. returns
  1416. # Used heap size in bytes.
  1417. number usedSize
  1418. # Allocated heap size in bytes.
  1419. number totalSize
  1420. # Returns properties of a given object. Object group of the result is inherited from the target
  1421. # object.
  1422. command getProperties
  1423. parameters
  1424. # Identifier of the object to return properties for.
  1425. RemoteObjectId objectId
  1426. # If true, returns properties belonging only to the element itself, not to its prototype
  1427. # chain.
  1428. optional boolean ownProperties
  1429. # If true, returns accessor properties (with getter/setter) only; internal properties are not
  1430. # returned either.
  1431. experimental optional boolean accessorPropertiesOnly
  1432. # Whether preview should be generated for the results.
  1433. experimental optional boolean generatePreview
  1434. # If true, returns non-indexed properties only.
  1435. experimental optional boolean nonIndexedPropertiesOnly
  1436. returns
  1437. # Object properties.
  1438. array of PropertyDescriptor result
  1439. # Internal object properties (only of the element itself).
  1440. optional array of InternalPropertyDescriptor internalProperties
  1441. # Object private properties.
  1442. experimental optional array of PrivatePropertyDescriptor privateProperties
  1443. # Exception details.
  1444. optional ExceptionDetails exceptionDetails
  1445. # Returns all let, const and class variables from global scope.
  1446. command globalLexicalScopeNames
  1447. parameters
  1448. # Specifies in which execution context to lookup global scope variables.
  1449. optional ExecutionContextId executionContextId
  1450. returns
  1451. array of string names
  1452. command queryObjects
  1453. parameters
  1454. # Identifier of the prototype to return objects for.
  1455. RemoteObjectId prototypeObjectId
  1456. # Symbolic group name that can be used to release the results.
  1457. optional string objectGroup
  1458. returns
  1459. # Array with objects.
  1460. RemoteObject objects
  1461. # Releases remote object with given id.
  1462. command releaseObject
  1463. parameters
  1464. # Identifier of the object to release.
  1465. RemoteObjectId objectId
  1466. # Releases all remote objects that belong to a given group.
  1467. command releaseObjectGroup
  1468. parameters
  1469. # Symbolic object group name.
  1470. string objectGroup
  1471. # Tells inspected instance to run if it was waiting for debugger to attach.
  1472. command runIfWaitingForDebugger
  1473. # Runs script with given id in a given context.
  1474. command runScript
  1475. parameters
  1476. # Id of the script to run.
  1477. ScriptId scriptId
  1478. # Specifies in which execution context to perform script run. If the parameter is omitted the
  1479. # evaluation will be performed in the context of the inspected page.
  1480. optional ExecutionContextId executionContextId
  1481. # Symbolic group name that can be used to release multiple objects.
  1482. optional string objectGroup
  1483. # In silent mode exceptions thrown during evaluation are not reported and do not pause
  1484. # execution. Overrides `setPauseOnException` state.
  1485. optional boolean silent
  1486. # Determines whether Command Line API should be available during the evaluation.
  1487. optional boolean includeCommandLineAPI
  1488. # Whether the result is expected to be a JSON object which should be sent by value.
  1489. optional boolean returnByValue
  1490. # Whether preview should be generated for the result.
  1491. optional boolean generatePreview
  1492. # Whether execution should `await` for resulting value and return once awaited promise is
  1493. # resolved.
  1494. optional boolean awaitPromise
  1495. returns
  1496. # Run result.
  1497. RemoteObject result
  1498. # Exception details.
  1499. optional ExceptionDetails exceptionDetails
  1500. # Enables or disables async call stacks tracking.
  1501. command setAsyncCallStackDepth
  1502. redirect Debugger
  1503. parameters
  1504. # Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  1505. # call stacks (default).
  1506. integer maxDepth
  1507. experimental command setCustomObjectFormatterEnabled
  1508. parameters
  1509. boolean enabled
  1510. experimental command setMaxCallStackSizeToCapture
  1511. parameters
  1512. integer size
  1513. # Terminate current or next JavaScript execution.
  1514. # Will cancel the termination when the outer-most script execution ends.
  1515. experimental command terminateExecution
  1516. # If executionContextId is empty, adds binding with the given name on the
  1517. # global objects of all inspected contexts, including those created later,
  1518. # bindings survive reloads.
  1519. # Binding function takes exactly one argument, this argument should be string,
  1520. # in case of any other input, function throws an exception.
  1521. # Each binding function call produces Runtime.bindingCalled notification.
  1522. command addBinding
  1523. parameters
  1524. string name
  1525. # If specified, the binding would only be exposed to the specified
  1526. # execution context. If omitted and `executionContextName` is not set,
  1527. # the binding is exposed to all execution contexts of the target.
  1528. # This parameter is mutually exclusive with `executionContextName`.
  1529. # Deprecated in favor of `executionContextName` due to an unclear use case
  1530. # and bugs in implementation (crbug.com/1169639). `executionContextId` will be
  1531. # removed in the future.
  1532. experimental deprecated optional ExecutionContextId executionContextId
  1533. # If specified, the binding is exposed to the executionContext with
  1534. # matching name, even for contexts created after the binding is added.
  1535. # See also `ExecutionContext.name` and `worldName` parameter to
  1536. # `Page.addScriptToEvaluateOnNewDocument`.
  1537. # This parameter is mutually exclusive with `executionContextId`.
  1538. optional string executionContextName
  1539. # This method does not remove binding function from global object but
  1540. # unsubscribes current runtime agent from Runtime.bindingCalled notifications.
  1541. command removeBinding
  1542. parameters
  1543. string name
  1544. # This method tries to lookup and populate exception details for a
  1545. # JavaScript Error object.
  1546. # Note that the stackTrace portion of the resulting exceptionDetails will
  1547. # only be populated if the Runtime domain was enabled at the time when the
  1548. # Error was thrown.
  1549. experimental command getExceptionDetails
  1550. parameters
  1551. # The error object for which to resolve the exception details.
  1552. RemoteObjectId errorObjectId
  1553. returns
  1554. optional ExceptionDetails exceptionDetails
  1555. # Notification is issued every time when binding is called.
  1556. experimental event bindingCalled
  1557. parameters
  1558. string name
  1559. string payload
  1560. # Identifier of the context where the call was made.
  1561. ExecutionContextId executionContextId
  1562. # Issued when console API was called.
  1563. event consoleAPICalled
  1564. parameters
  1565. # Type of the call.
  1566. enum type
  1567. log
  1568. debug
  1569. info
  1570. error
  1571. warning
  1572. dir
  1573. dirxml
  1574. table
  1575. trace
  1576. clear
  1577. startGroup
  1578. startGroupCollapsed
  1579. endGroup
  1580. assert
  1581. profile
  1582. profileEnd
  1583. count
  1584. timeEnd
  1585. # Call arguments.
  1586. array of RemoteObject args
  1587. # Identifier of the context where the call was made.
  1588. ExecutionContextId executionContextId
  1589. # Call timestamp.
  1590. Timestamp timestamp
  1591. # Stack trace captured when the call was made. The async stack chain is automatically reported for
  1592. # the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call
  1593. # chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
  1594. optional StackTrace stackTrace
  1595. # Console context descriptor for calls on non-default console context (not console.*):
  1596. # 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
  1597. # on named context.
  1598. experimental optional string context
  1599. # Issued when unhandled exception was revoked.
  1600. event exceptionRevoked
  1601. parameters
  1602. # Reason describing why exception was revoked.
  1603. string reason
  1604. # The id of revoked exception, as reported in `exceptionThrown`.
  1605. integer exceptionId
  1606. # Issued when exception was thrown and unhandled.
  1607. event exceptionThrown
  1608. parameters
  1609. # Timestamp of the exception.
  1610. Timestamp timestamp
  1611. ExceptionDetails exceptionDetails
  1612. # Issued when new execution context is created.
  1613. event executionContextCreated
  1614. parameters
  1615. # A newly created execution context.
  1616. ExecutionContextDescription context
  1617. # Issued when execution context is destroyed.
  1618. event executionContextDestroyed
  1619. parameters
  1620. # Id of the destroyed context
  1621. deprecated ExecutionContextId executionContextId
  1622. # Unique Id of the destroyed context
  1623. experimental string executionContextUniqueId
  1624. # Issued when all executionContexts were cleared in browser
  1625. event executionContextsCleared
  1626. # Issued when object should be inspected (for example, as a result of inspect() command line API
  1627. # call).
  1628. event inspectRequested
  1629. parameters
  1630. RemoteObject object
  1631. object hints
  1632. # Identifier of the context where the call was made.
  1633. experimental optional ExecutionContextId executionContextId
  1634. # This domain is deprecated.
  1635. deprecated domain Schema
  1636. # Description of the protocol domain.
  1637. type Domain extends object
  1638. properties
  1639. # Domain name.
  1640. string name
  1641. # Domain version.
  1642. string version
  1643. # Returns supported domains.
  1644. command getDomains
  1645. returns
  1646. # List of supported domains.
  1647. array of Domain domains