js_protocol.pdl 61 KB

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