You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

inspector.d.ts 124KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257
  1. // tslint:disable-next-line:dt-header
  2. // Type definitions for inspector
  3. // These definitions are auto-generated.
  4. // Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
  5. // for more information.
  6. /**
  7. * The inspector module provides an API for interacting with the V8 inspector.
  8. */
  9. declare module "inspector" {
  10. import { EventEmitter } from 'events';
  11. interface InspectorNotification<T> {
  12. method: string;
  13. params: T;
  14. }
  15. namespace Console {
  16. /**
  17. * Console message.
  18. */
  19. interface ConsoleMessage {
  20. /**
  21. * Message source.
  22. */
  23. source: string;
  24. /**
  25. * Message severity.
  26. */
  27. level: string;
  28. /**
  29. * Message text.
  30. */
  31. text: string;
  32. /**
  33. * URL of the message origin.
  34. */
  35. url?: string;
  36. /**
  37. * Line number in the resource that generated this message (1-based).
  38. */
  39. line?: number;
  40. /**
  41. * Column number in the resource that generated this message (1-based).
  42. */
  43. column?: number;
  44. }
  45. interface MessageAddedEventDataType {
  46. /**
  47. * Console message that has been added.
  48. */
  49. message: ConsoleMessage;
  50. }
  51. }
  52. namespace Debugger {
  53. /**
  54. * Breakpoint identifier.
  55. */
  56. type BreakpointId = string;
  57. /**
  58. * Call frame identifier.
  59. */
  60. type CallFrameId = string;
  61. /**
  62. * Location in the source code.
  63. */
  64. interface Location {
  65. /**
  66. * Script identifier as reported in the `Debugger.scriptParsed`.
  67. */
  68. scriptId: Runtime.ScriptId;
  69. /**
  70. * Line number in the script (0-based).
  71. */
  72. lineNumber: number;
  73. /**
  74. * Column number in the script (0-based).
  75. */
  76. columnNumber?: number;
  77. }
  78. /**
  79. * Location in the source code.
  80. * @experimental
  81. */
  82. interface ScriptPosition {
  83. lineNumber: number;
  84. columnNumber: number;
  85. }
  86. /**
  87. * JavaScript call frame. Array of call frames form the call stack.
  88. */
  89. interface CallFrame {
  90. /**
  91. * Call frame identifier. This identifier is only valid while the virtual machine is paused.
  92. */
  93. callFrameId: CallFrameId;
  94. /**
  95. * Name of the JavaScript function called on this call frame.
  96. */
  97. functionName: string;
  98. /**
  99. * Location in the source code.
  100. */
  101. functionLocation?: Location;
  102. /**
  103. * Location in the source code.
  104. */
  105. location: Location;
  106. /**
  107. * JavaScript script name or url.
  108. */
  109. url: string;
  110. /**
  111. * Scope chain for this call frame.
  112. */
  113. scopeChain: Scope[];
  114. /**
  115. * `this` object for this call frame.
  116. */
  117. this: Runtime.RemoteObject;
  118. /**
  119. * The value being returned, if the function is at return point.
  120. */
  121. returnValue?: Runtime.RemoteObject;
  122. }
  123. /**
  124. * Scope description.
  125. */
  126. interface Scope {
  127. /**
  128. * Scope type.
  129. */
  130. type: string;
  131. /**
  132. * Object representing the scope. For `global` and `with` scopes it represents the actual
  133. * object; for the rest of the scopes, it is artificial transient object enumerating scope
  134. * variables as its properties.
  135. */
  136. object: Runtime.RemoteObject;
  137. name?: string;
  138. /**
  139. * Location in the source code where scope starts
  140. */
  141. startLocation?: Location;
  142. /**
  143. * Location in the source code where scope ends
  144. */
  145. endLocation?: Location;
  146. }
  147. /**
  148. * Search match for resource.
  149. */
  150. interface SearchMatch {
  151. /**
  152. * Line number in resource content.
  153. */
  154. lineNumber: number;
  155. /**
  156. * Line with match content.
  157. */
  158. lineContent: string;
  159. }
  160. interface BreakLocation {
  161. /**
  162. * Script identifier as reported in the `Debugger.scriptParsed`.
  163. */
  164. scriptId: Runtime.ScriptId;
  165. /**
  166. * Line number in the script (0-based).
  167. */
  168. lineNumber: number;
  169. /**
  170. * Column number in the script (0-based).
  171. */
  172. columnNumber?: number;
  173. type?: string;
  174. }
  175. interface ContinueToLocationParameterType {
  176. /**
  177. * Location to continue to.
  178. */
  179. location: Location;
  180. targetCallFrames?: string;
  181. }
  182. interface EvaluateOnCallFrameParameterType {
  183. /**
  184. * Call frame identifier to evaluate on.
  185. */
  186. callFrameId: CallFrameId;
  187. /**
  188. * Expression to evaluate.
  189. */
  190. expression: string;
  191. /**
  192. * String object group name to put result into (allows rapid releasing resulting object handles
  193. * using `releaseObjectGroup`).
  194. */
  195. objectGroup?: string;
  196. /**
  197. * Specifies whether command line API should be available to the evaluated expression, defaults
  198. * to false.
  199. */
  200. includeCommandLineAPI?: boolean;
  201. /**
  202. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  203. * execution. Overrides `setPauseOnException` state.
  204. */
  205. silent?: boolean;
  206. /**
  207. * Whether the result is expected to be a JSON object that should be sent by value.
  208. */
  209. returnByValue?: boolean;
  210. /**
  211. * Whether preview should be generated for the result.
  212. * @experimental
  213. */
  214. generatePreview?: boolean;
  215. /**
  216. * Whether to throw an exception if side effect cannot be ruled out during evaluation.
  217. */
  218. throwOnSideEffect?: boolean;
  219. /**
  220. * Terminate execution after timing out (number of milliseconds).
  221. * @experimental
  222. */
  223. timeout?: Runtime.TimeDelta;
  224. }
  225. interface GetPossibleBreakpointsParameterType {
  226. /**
  227. * Start of range to search possible breakpoint locations in.
  228. */
  229. start: Location;
  230. /**
  231. * End of range to search possible breakpoint locations in (excluding). When not specified, end
  232. * of scripts is used as end of range.
  233. */
  234. end?: Location;
  235. /**
  236. * Only consider locations which are in the same (non-nested) function as start.
  237. */
  238. restrictToFunction?: boolean;
  239. }
  240. interface GetScriptSourceParameterType {
  241. /**
  242. * Id of the script to get source for.
  243. */
  244. scriptId: Runtime.ScriptId;
  245. }
  246. interface GetStackTraceParameterType {
  247. stackTraceId: Runtime.StackTraceId;
  248. }
  249. interface PauseOnAsyncCallParameterType {
  250. /**
  251. * Debugger will pause when async call with given stack trace is started.
  252. */
  253. parentStackTraceId: Runtime.StackTraceId;
  254. }
  255. interface RemoveBreakpointParameterType {
  256. breakpointId: BreakpointId;
  257. }
  258. interface RestartFrameParameterType {
  259. /**
  260. * Call frame identifier to evaluate on.
  261. */
  262. callFrameId: CallFrameId;
  263. }
  264. interface SearchInContentParameterType {
  265. /**
  266. * Id of the script to search in.
  267. */
  268. scriptId: Runtime.ScriptId;
  269. /**
  270. * String to search for.
  271. */
  272. query: string;
  273. /**
  274. * If true, search is case sensitive.
  275. */
  276. caseSensitive?: boolean;
  277. /**
  278. * If true, treats string parameter as regex.
  279. */
  280. isRegex?: boolean;
  281. }
  282. interface SetAsyncCallStackDepthParameterType {
  283. /**
  284. * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  285. * call stacks (default).
  286. */
  287. maxDepth: number;
  288. }
  289. interface SetBlackboxPatternsParameterType {
  290. /**
  291. * Array of regexps that will be used to check script url for blackbox state.
  292. */
  293. patterns: string[];
  294. }
  295. interface SetBlackboxedRangesParameterType {
  296. /**
  297. * Id of the script.
  298. */
  299. scriptId: Runtime.ScriptId;
  300. positions: ScriptPosition[];
  301. }
  302. interface SetBreakpointParameterType {
  303. /**
  304. * Location to set breakpoint in.
  305. */
  306. location: Location;
  307. /**
  308. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  309. * breakpoint if this expression evaluates to true.
  310. */
  311. condition?: string;
  312. }
  313. interface SetBreakpointByUrlParameterType {
  314. /**
  315. * Line number to set breakpoint at.
  316. */
  317. lineNumber: number;
  318. /**
  319. * URL of the resources to set breakpoint on.
  320. */
  321. url?: string;
  322. /**
  323. * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or
  324. * `urlRegex` must be specified.
  325. */
  326. urlRegex?: string;
  327. /**
  328. * Script hash of the resources to set breakpoint on.
  329. */
  330. scriptHash?: string;
  331. /**
  332. * Offset in the line to set breakpoint at.
  333. */
  334. columnNumber?: number;
  335. /**
  336. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the
  337. * breakpoint if this expression evaluates to true.
  338. */
  339. condition?: string;
  340. }
  341. interface SetBreakpointOnFunctionCallParameterType {
  342. /**
  343. * Function object id.
  344. */
  345. objectId: Runtime.RemoteObjectId;
  346. /**
  347. * Expression to use as a breakpoint condition. When specified, debugger will
  348. * stop on the breakpoint if this expression evaluates to true.
  349. */
  350. condition?: string;
  351. }
  352. interface SetBreakpointsActiveParameterType {
  353. /**
  354. * New value for breakpoints active state.
  355. */
  356. active: boolean;
  357. }
  358. interface SetPauseOnExceptionsParameterType {
  359. /**
  360. * Pause on exceptions mode.
  361. */
  362. state: string;
  363. }
  364. interface SetReturnValueParameterType {
  365. /**
  366. * New return value.
  367. */
  368. newValue: Runtime.CallArgument;
  369. }
  370. interface SetScriptSourceParameterType {
  371. /**
  372. * Id of the script to edit.
  373. */
  374. scriptId: Runtime.ScriptId;
  375. /**
  376. * New content of the script.
  377. */
  378. scriptSource: string;
  379. /**
  380. * If true the change will not actually be applied. Dry run may be used to get result
  381. * description without actually modifying the code.
  382. */
  383. dryRun?: boolean;
  384. }
  385. interface SetSkipAllPausesParameterType {
  386. /**
  387. * New value for skip pauses state.
  388. */
  389. skip: boolean;
  390. }
  391. interface SetVariableValueParameterType {
  392. /**
  393. * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'
  394. * scope types are allowed. Other scopes could be manipulated manually.
  395. */
  396. scopeNumber: number;
  397. /**
  398. * Variable name.
  399. */
  400. variableName: string;
  401. /**
  402. * New variable value.
  403. */
  404. newValue: Runtime.CallArgument;
  405. /**
  406. * Id of callframe that holds variable.
  407. */
  408. callFrameId: CallFrameId;
  409. }
  410. interface StepIntoParameterType {
  411. /**
  412. * Debugger will issue additional Debugger.paused notification if any async task is scheduled
  413. * before next pause.
  414. * @experimental
  415. */
  416. breakOnAsyncCall?: boolean;
  417. }
  418. interface EnableReturnType {
  419. /**
  420. * Unique identifier of the debugger.
  421. * @experimental
  422. */
  423. debuggerId: Runtime.UniqueDebuggerId;
  424. }
  425. interface EvaluateOnCallFrameReturnType {
  426. /**
  427. * Object wrapper for the evaluation result.
  428. */
  429. result: Runtime.RemoteObject;
  430. /**
  431. * Exception details.
  432. */
  433. exceptionDetails?: Runtime.ExceptionDetails;
  434. }
  435. interface GetPossibleBreakpointsReturnType {
  436. /**
  437. * List of the possible breakpoint locations.
  438. */
  439. locations: BreakLocation[];
  440. }
  441. interface GetScriptSourceReturnType {
  442. /**
  443. * Script source.
  444. */
  445. scriptSource: string;
  446. }
  447. interface GetStackTraceReturnType {
  448. stackTrace: Runtime.StackTrace;
  449. }
  450. interface RestartFrameReturnType {
  451. /**
  452. * New stack trace.
  453. */
  454. callFrames: CallFrame[];
  455. /**
  456. * Async stack trace, if any.
  457. */
  458. asyncStackTrace?: Runtime.StackTrace;
  459. /**
  460. * Async stack trace, if any.
  461. * @experimental
  462. */
  463. asyncStackTraceId?: Runtime.StackTraceId;
  464. }
  465. interface SearchInContentReturnType {
  466. /**
  467. * List of search matches.
  468. */
  469. result: SearchMatch[];
  470. }
  471. interface SetBreakpointReturnType {
  472. /**
  473. * Id of the created breakpoint for further reference.
  474. */
  475. breakpointId: BreakpointId;
  476. /**
  477. * Location this breakpoint resolved into.
  478. */
  479. actualLocation: Location;
  480. }
  481. interface SetBreakpointByUrlReturnType {
  482. /**
  483. * Id of the created breakpoint for further reference.
  484. */
  485. breakpointId: BreakpointId;
  486. /**
  487. * List of the locations this breakpoint resolved into upon addition.
  488. */
  489. locations: Location[];
  490. }
  491. interface SetBreakpointOnFunctionCallReturnType {
  492. /**
  493. * Id of the created breakpoint for further reference.
  494. */
  495. breakpointId: BreakpointId;
  496. }
  497. interface SetScriptSourceReturnType {
  498. /**
  499. * New stack trace in case editing has happened while VM was stopped.
  500. */
  501. callFrames?: CallFrame[];
  502. /**
  503. * Whether current call stack was modified after applying the changes.
  504. */
  505. stackChanged?: boolean;
  506. /**
  507. * Async stack trace, if any.
  508. */
  509. asyncStackTrace?: Runtime.StackTrace;
  510. /**
  511. * Async stack trace, if any.
  512. * @experimental
  513. */
  514. asyncStackTraceId?: Runtime.StackTraceId;
  515. /**
  516. * Exception details if any.
  517. */
  518. exceptionDetails?: Runtime.ExceptionDetails;
  519. }
  520. interface BreakpointResolvedEventDataType {
  521. /**
  522. * Breakpoint unique identifier.
  523. */
  524. breakpointId: BreakpointId;
  525. /**
  526. * Actual breakpoint location.
  527. */
  528. location: Location;
  529. }
  530. interface PausedEventDataType {
  531. /**
  532. * Call stack the virtual machine stopped on.
  533. */
  534. callFrames: CallFrame[];
  535. /**
  536. * Pause reason.
  537. */
  538. reason: string;
  539. /**
  540. * Object containing break-specific auxiliary properties.
  541. */
  542. data?: {};
  543. /**
  544. * Hit breakpoints IDs
  545. */
  546. hitBreakpoints?: string[];
  547. /**
  548. * Async stack trace, if any.
  549. */
  550. asyncStackTrace?: Runtime.StackTrace;
  551. /**
  552. * Async stack trace, if any.
  553. * @experimental
  554. */
  555. asyncStackTraceId?: Runtime.StackTraceId;
  556. /**
  557. * Just scheduled async call will have this stack trace as parent stack during async execution.
  558. * This field is available only after `Debugger.stepInto` call with `breakOnAsynCall` flag.
  559. * @experimental
  560. */
  561. asyncCallStackTraceId?: Runtime.StackTraceId;
  562. }
  563. interface ScriptFailedToParseEventDataType {
  564. /**
  565. * Identifier of the script parsed.
  566. */
  567. scriptId: Runtime.ScriptId;
  568. /**
  569. * URL or name of the script parsed (if any).
  570. */
  571. url: string;
  572. /**
  573. * Line offset of the script within the resource with given URL (for script tags).
  574. */
  575. startLine: number;
  576. /**
  577. * Column offset of the script within the resource with given URL.
  578. */
  579. startColumn: number;
  580. /**
  581. * Last line of the script.
  582. */
  583. endLine: number;
  584. /**
  585. * Length of the last line of the script.
  586. */
  587. endColumn: number;
  588. /**
  589. * Specifies script creation context.
  590. */
  591. executionContextId: Runtime.ExecutionContextId;
  592. /**
  593. * Content hash of the script.
  594. */
  595. hash: string;
  596. /**
  597. * Embedder-specific auxiliary data.
  598. */
  599. executionContextAuxData?: {};
  600. /**
  601. * URL of source map associated with script (if any).
  602. */
  603. sourceMapURL?: string;
  604. /**
  605. * True, if this script has sourceURL.
  606. */
  607. hasSourceURL?: boolean;
  608. /**
  609. * True, if this script is ES6 module.
  610. */
  611. isModule?: boolean;
  612. /**
  613. * This script length.
  614. */
  615. length?: number;
  616. /**
  617. * JavaScript top stack frame of where the script parsed event was triggered if available.
  618. * @experimental
  619. */
  620. stackTrace?: Runtime.StackTrace;
  621. }
  622. interface ScriptParsedEventDataType {
  623. /**
  624. * Identifier of the script parsed.
  625. */
  626. scriptId: Runtime.ScriptId;
  627. /**
  628. * URL or name of the script parsed (if any).
  629. */
  630. url: string;
  631. /**
  632. * Line offset of the script within the resource with given URL (for script tags).
  633. */
  634. startLine: number;
  635. /**
  636. * Column offset of the script within the resource with given URL.
  637. */
  638. startColumn: number;
  639. /**
  640. * Last line of the script.
  641. */
  642. endLine: number;
  643. /**
  644. * Length of the last line of the script.
  645. */
  646. endColumn: number;
  647. /**
  648. * Specifies script creation context.
  649. */
  650. executionContextId: Runtime.ExecutionContextId;
  651. /**
  652. * Content hash of the script.
  653. */
  654. hash: string;
  655. /**
  656. * Embedder-specific auxiliary data.
  657. */
  658. executionContextAuxData?: {};
  659. /**
  660. * True, if this script is generated as a result of the live edit operation.
  661. * @experimental
  662. */
  663. isLiveEdit?: boolean;
  664. /**
  665. * URL of source map associated with script (if any).
  666. */
  667. sourceMapURL?: string;
  668. /**
  669. * True, if this script has sourceURL.
  670. */
  671. hasSourceURL?: boolean;
  672. /**
  673. * True, if this script is ES6 module.
  674. */
  675. isModule?: boolean;
  676. /**
  677. * This script length.
  678. */
  679. length?: number;
  680. /**
  681. * JavaScript top stack frame of where the script parsed event was triggered if available.
  682. * @experimental
  683. */
  684. stackTrace?: Runtime.StackTrace;
  685. }
  686. }
  687. namespace HeapProfiler {
  688. /**
  689. * Heap snapshot object id.
  690. */
  691. type HeapSnapshotObjectId = string;
  692. /**
  693. * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
  694. */
  695. interface SamplingHeapProfileNode {
  696. /**
  697. * Function location.
  698. */
  699. callFrame: Runtime.CallFrame;
  700. /**
  701. * Allocations size in bytes for the node excluding children.
  702. */
  703. selfSize: number;
  704. /**
  705. * Child nodes.
  706. */
  707. children: SamplingHeapProfileNode[];
  708. }
  709. /**
  710. * Profile.
  711. */
  712. interface SamplingHeapProfile {
  713. head: SamplingHeapProfileNode;
  714. }
  715. interface AddInspectedHeapObjectParameterType {
  716. /**
  717. * Heap snapshot object id to be accessible by means of $x command line API.
  718. */
  719. heapObjectId: HeapSnapshotObjectId;
  720. }
  721. interface GetHeapObjectIdParameterType {
  722. /**
  723. * Identifier of the object to get heap object id for.
  724. */
  725. objectId: Runtime.RemoteObjectId;
  726. }
  727. interface GetObjectByHeapObjectIdParameterType {
  728. objectId: HeapSnapshotObjectId;
  729. /**
  730. * Symbolic group name that can be used to release multiple objects.
  731. */
  732. objectGroup?: string;
  733. }
  734. interface StartSamplingParameterType {
  735. /**
  736. * Average sample interval in bytes. Poisson distribution is used for the intervals. The
  737. * default value is 32768 bytes.
  738. */
  739. samplingInterval?: number;
  740. }
  741. interface StartTrackingHeapObjectsParameterType {
  742. trackAllocations?: boolean;
  743. }
  744. interface StopTrackingHeapObjectsParameterType {
  745. /**
  746. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
  747. * when the tracking is stopped.
  748. */
  749. reportProgress?: boolean;
  750. }
  751. interface TakeHeapSnapshotParameterType {
  752. /**
  753. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
  754. */
  755. reportProgress?: boolean;
  756. }
  757. interface GetHeapObjectIdReturnType {
  758. /**
  759. * Id of the heap snapshot object corresponding to the passed remote object id.
  760. */
  761. heapSnapshotObjectId: HeapSnapshotObjectId;
  762. }
  763. interface GetObjectByHeapObjectIdReturnType {
  764. /**
  765. * Evaluation result.
  766. */
  767. result: Runtime.RemoteObject;
  768. }
  769. interface GetSamplingProfileReturnType {
  770. /**
  771. * Return the sampling profile being collected.
  772. */
  773. profile: SamplingHeapProfile;
  774. }
  775. interface StopSamplingReturnType {
  776. /**
  777. * Recorded sampling heap profile.
  778. */
  779. profile: SamplingHeapProfile;
  780. }
  781. interface AddHeapSnapshotChunkEventDataType {
  782. chunk: string;
  783. }
  784. interface HeapStatsUpdateEventDataType {
  785. /**
  786. * An array of triplets. Each triplet describes a fragment. The first integer is the fragment
  787. * index, the second integer is a total count of objects for the fragment, the third integer is
  788. * a total size of the objects for the fragment.
  789. */
  790. statsUpdate: number[];
  791. }
  792. interface LastSeenObjectIdEventDataType {
  793. lastSeenObjectId: number;
  794. timestamp: number;
  795. }
  796. interface ReportHeapSnapshotProgressEventDataType {
  797. done: number;
  798. total: number;
  799. finished?: boolean;
  800. }
  801. }
  802. namespace Profiler {
  803. /**
  804. * Profile node. Holds callsite information, execution statistics and child nodes.
  805. */
  806. interface ProfileNode {
  807. /**
  808. * Unique id of the node.
  809. */
  810. id: number;
  811. /**
  812. * Function location.
  813. */
  814. callFrame: Runtime.CallFrame;
  815. /**
  816. * Number of samples where this node was on top of the call stack.
  817. */
  818. hitCount?: number;
  819. /**
  820. * Child node ids.
  821. */
  822. children?: number[];
  823. /**
  824. * The reason of being not optimized. The function may be deoptimized or marked as don't
  825. * optimize.
  826. */
  827. deoptReason?: string;
  828. /**
  829. * An array of source position ticks.
  830. */
  831. positionTicks?: PositionTickInfo[];
  832. }
  833. /**
  834. * Profile.
  835. */
  836. interface Profile {
  837. /**
  838. * The list of profile nodes. First item is the root node.
  839. */
  840. nodes: ProfileNode[];
  841. /**
  842. * Profiling start timestamp in microseconds.
  843. */
  844. startTime: number;
  845. /**
  846. * Profiling end timestamp in microseconds.
  847. */
  848. endTime: number;
  849. /**
  850. * Ids of samples top nodes.
  851. */
  852. samples?: number[];
  853. /**
  854. * Time intervals between adjacent samples in microseconds. The first delta is relative to the
  855. * profile startTime.
  856. */
  857. timeDeltas?: number[];
  858. }
  859. /**
  860. * Specifies a number of samples attributed to a certain source position.
  861. */
  862. interface PositionTickInfo {
  863. /**
  864. * Source line number (1-based).
  865. */
  866. line: number;
  867. /**
  868. * Number of samples attributed to the source line.
  869. */
  870. ticks: number;
  871. }
  872. /**
  873. * Coverage data for a source range.
  874. */
  875. interface CoverageRange {
  876. /**
  877. * JavaScript script source offset for the range start.
  878. */
  879. startOffset: number;
  880. /**
  881. * JavaScript script source offset for the range end.
  882. */
  883. endOffset: number;
  884. /**
  885. * Collected execution count of the source range.
  886. */
  887. count: number;
  888. }
  889. /**
  890. * Coverage data for a JavaScript function.
  891. */
  892. interface FunctionCoverage {
  893. /**
  894. * JavaScript function name.
  895. */
  896. functionName: string;
  897. /**
  898. * Source ranges inside the function with coverage data.
  899. */
  900. ranges: CoverageRange[];
  901. /**
  902. * Whether coverage data for this function has block granularity.
  903. */
  904. isBlockCoverage: boolean;
  905. }
  906. /**
  907. * Coverage data for a JavaScript script.
  908. */
  909. interface ScriptCoverage {
  910. /**
  911. * JavaScript script id.
  912. */
  913. scriptId: Runtime.ScriptId;
  914. /**
  915. * JavaScript script name or url.
  916. */
  917. url: string;
  918. /**
  919. * Functions contained in the script that has coverage data.
  920. */
  921. functions: FunctionCoverage[];
  922. }
  923. /**
  924. * Describes a type collected during runtime.
  925. * @experimental
  926. */
  927. interface TypeObject {
  928. /**
  929. * Name of a type collected with type profiling.
  930. */
  931. name: string;
  932. }
  933. /**
  934. * Source offset and types for a parameter or return value.
  935. * @experimental
  936. */
  937. interface TypeProfileEntry {
  938. /**
  939. * Source offset of the parameter or end of function for return values.
  940. */
  941. offset: number;
  942. /**
  943. * The types for this parameter or return value.
  944. */
  945. types: TypeObject[];
  946. }
  947. /**
  948. * Type profile data collected during runtime for a JavaScript script.
  949. * @experimental
  950. */
  951. interface ScriptTypeProfile {
  952. /**
  953. * JavaScript script id.
  954. */
  955. scriptId: Runtime.ScriptId;
  956. /**
  957. * JavaScript script name or url.
  958. */
  959. url: string;
  960. /**
  961. * Type profile entries for parameters and return values of the functions in the script.
  962. */
  963. entries: TypeProfileEntry[];
  964. }
  965. interface SetSamplingIntervalParameterType {
  966. /**
  967. * New sampling interval in microseconds.
  968. */
  969. interval: number;
  970. }
  971. interface StartPreciseCoverageParameterType {
  972. /**
  973. * Collect accurate call counts beyond simple 'covered' or 'not covered'.
  974. */
  975. callCount?: boolean;
  976. /**
  977. * Collect block-based coverage.
  978. */
  979. detailed?: boolean;
  980. }
  981. interface GetBestEffortCoverageReturnType {
  982. /**
  983. * Coverage data for the current isolate.
  984. */
  985. result: ScriptCoverage[];
  986. }
  987. interface StopReturnType {
  988. /**
  989. * Recorded profile.
  990. */
  991. profile: Profile;
  992. }
  993. interface TakePreciseCoverageReturnType {
  994. /**
  995. * Coverage data for the current isolate.
  996. */
  997. result: ScriptCoverage[];
  998. }
  999. interface TakeTypeProfileReturnType {
  1000. /**
  1001. * Type profile for all scripts since startTypeProfile() was turned on.
  1002. */
  1003. result: ScriptTypeProfile[];
  1004. }
  1005. interface ConsoleProfileFinishedEventDataType {
  1006. id: string;
  1007. /**
  1008. * Location of console.profileEnd().
  1009. */
  1010. location: Debugger.Location;
  1011. profile: Profile;
  1012. /**
  1013. * Profile title passed as an argument to console.profile().
  1014. */
  1015. title?: string;
  1016. }
  1017. interface ConsoleProfileStartedEventDataType {
  1018. id: string;
  1019. /**
  1020. * Location of console.profile().
  1021. */
  1022. location: Debugger.Location;
  1023. /**
  1024. * Profile title passed as an argument to console.profile().
  1025. */
  1026. title?: string;
  1027. }
  1028. }
  1029. namespace Runtime {
  1030. /**
  1031. * Unique script identifier.
  1032. */
  1033. type ScriptId = string;
  1034. /**
  1035. * Unique object identifier.
  1036. */
  1037. type RemoteObjectId = string;
  1038. /**
  1039. * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`,
  1040. * `-Infinity`, and bigint literals.
  1041. */
  1042. type UnserializableValue = string;
  1043. /**
  1044. * Mirror object referencing original JavaScript object.
  1045. */
  1046. interface RemoteObject {
  1047. /**
  1048. * Object type.
  1049. */
  1050. type: string;
  1051. /**
  1052. * Object subtype hint. Specified for `object` type values only.
  1053. */
  1054. subtype?: string;
  1055. /**
  1056. * Object class (constructor) name. Specified for `object` type values only.
  1057. */
  1058. className?: string;
  1059. /**
  1060. * Remote object value in case of primitive values or JSON values (if it was requested).
  1061. */
  1062. value?: any;
  1063. /**
  1064. * Primitive value which can not be JSON-stringified does not have `value`, but gets this
  1065. * property.
  1066. */
  1067. unserializableValue?: UnserializableValue;
  1068. /**
  1069. * String representation of the object.
  1070. */
  1071. description?: string;
  1072. /**
  1073. * Unique object identifier (for non-primitive values).
  1074. */
  1075. objectId?: RemoteObjectId;
  1076. /**
  1077. * Preview containing abbreviated property values. Specified for `object` type values only.
  1078. * @experimental
  1079. */
  1080. preview?: ObjectPreview;
  1081. /**
  1082. * @experimental
  1083. */
  1084. customPreview?: CustomPreview;
  1085. }
  1086. /**
  1087. * @experimental
  1088. */
  1089. interface CustomPreview {
  1090. header: string;
  1091. hasBody: boolean;
  1092. formatterObjectId: RemoteObjectId;
  1093. bindRemoteObjectFunctionId: RemoteObjectId;
  1094. configObjectId?: RemoteObjectId;
  1095. }
  1096. /**
  1097. * Object containing abbreviated remote object value.
  1098. * @experimental
  1099. */
  1100. interface ObjectPreview {
  1101. /**
  1102. * Object type.
  1103. */
  1104. type: string;
  1105. /**
  1106. * Object subtype hint. Specified for `object` type values only.
  1107. */
  1108. subtype?: string;
  1109. /**
  1110. * String representation of the object.
  1111. */
  1112. description?: string;
  1113. /**
  1114. * True iff some of the properties or entries of the original object did not fit.
  1115. */
  1116. overflow: boolean;
  1117. /**
  1118. * List of the properties.
  1119. */
  1120. properties: PropertyPreview[];
  1121. /**
  1122. * List of the entries. Specified for `map` and `set` subtype values only.
  1123. */
  1124. entries?: EntryPreview[];
  1125. }
  1126. /**
  1127. * @experimental
  1128. */
  1129. interface PropertyPreview {
  1130. /**
  1131. * Property name.
  1132. */
  1133. name: string;
  1134. /**
  1135. * Object type. Accessor means that the property itself is an accessor property.
  1136. */
  1137. type: string;
  1138. /**
  1139. * User-friendly property value string.
  1140. */
  1141. value?: string;
  1142. /**
  1143. * Nested value preview.
  1144. */
  1145. valuePreview?: ObjectPreview;
  1146. /**
  1147. * Object subtype hint. Specified for `object` type values only.
  1148. */
  1149. subtype?: string;
  1150. }
  1151. /**
  1152. * @experimental
  1153. */
  1154. interface EntryPreview {
  1155. /**
  1156. * Preview of the key. Specified for map-like collection entries.
  1157. */
  1158. key?: ObjectPreview;
  1159. /**
  1160. * Preview of the value.
  1161. */
  1162. value: ObjectPreview;
  1163. }
  1164. /**
  1165. * Object property descriptor.
  1166. */
  1167. interface PropertyDescriptor {
  1168. /**
  1169. * Property name or symbol description.
  1170. */
  1171. name: string;
  1172. /**
  1173. * The value associated with the property.
  1174. */
  1175. value?: RemoteObject;
  1176. /**
  1177. * True if the value associated with the property may be changed (data descriptors only).
  1178. */
  1179. writable?: boolean;
  1180. /**
  1181. * A function which serves as a getter for the property, or `undefined` if there is no getter
  1182. * (accessor descriptors only).
  1183. */
  1184. get?: RemoteObject;
  1185. /**
  1186. * A function which serves as a setter for the property, or `undefined` if there is no setter
  1187. * (accessor descriptors only).
  1188. */
  1189. set?: RemoteObject;
  1190. /**
  1191. * True if the type of this property descriptor may be changed and if the property may be
  1192. * deleted from the corresponding object.
  1193. */
  1194. configurable: boolean;
  1195. /**
  1196. * True if this property shows up during enumeration of the properties on the corresponding
  1197. * object.
  1198. */
  1199. enumerable: boolean;
  1200. /**
  1201. * True if the result was thrown during the evaluation.
  1202. */
  1203. wasThrown?: boolean;
  1204. /**
  1205. * True if the property is owned for the object.
  1206. */
  1207. isOwn?: boolean;
  1208. /**
  1209. * Property symbol object, if the property is of the `symbol` type.
  1210. */
  1211. symbol?: RemoteObject;
  1212. }
  1213. /**
  1214. * Object internal property descriptor. This property isn't normally visible in JavaScript code.
  1215. */
  1216. interface InternalPropertyDescriptor {
  1217. /**
  1218. * Conventional property name.
  1219. */
  1220. name: string;
  1221. /**
  1222. * The value associated with the property.
  1223. */
  1224. value?: RemoteObject;
  1225. }
  1226. /**
  1227. * Represents function call argument. Either remote object id `objectId`, primitive `value`,
  1228. * unserializable primitive value or neither of (for undefined) them should be specified.
  1229. */
  1230. interface CallArgument {
  1231. /**
  1232. * Primitive value or serializable javascript object.
  1233. */
  1234. value?: any;
  1235. /**
  1236. * Primitive value which can not be JSON-stringified.
  1237. */
  1238. unserializableValue?: UnserializableValue;
  1239. /**
  1240. * Remote object handle.
  1241. */
  1242. objectId?: RemoteObjectId;
  1243. }
  1244. /**
  1245. * Id of an execution context.
  1246. */
  1247. type ExecutionContextId = number;
  1248. /**
  1249. * Description of an isolated world.
  1250. */
  1251. interface ExecutionContextDescription {
  1252. /**
  1253. * Unique id of the execution context. It can be used to specify in which execution context
  1254. * script evaluation should be performed.
  1255. */
  1256. id: ExecutionContextId;
  1257. /**
  1258. * Execution context origin.
  1259. */
  1260. origin: string;
  1261. /**
  1262. * Human readable name describing given context.
  1263. */
  1264. name: string;
  1265. /**
  1266. * Embedder-specific auxiliary data.
  1267. */
  1268. auxData?: {};
  1269. }
  1270. /**
  1271. * Detailed information about exception (or error) that was thrown during script compilation or
  1272. * execution.
  1273. */
  1274. interface ExceptionDetails {
  1275. /**
  1276. * Exception id.
  1277. */
  1278. exceptionId: number;
  1279. /**
  1280. * Exception text, which should be used together with exception object when available.
  1281. */
  1282. text: string;
  1283. /**
  1284. * Line number of the exception location (0-based).
  1285. */
  1286. lineNumber: number;
  1287. /**
  1288. * Column number of the exception location (0-based).
  1289. */
  1290. columnNumber: number;
  1291. /**
  1292. * Script ID of the exception location.
  1293. */
  1294. scriptId?: ScriptId;
  1295. /**
  1296. * URL of the exception location, to be used when the script was not reported.
  1297. */
  1298. url?: string;
  1299. /**
  1300. * JavaScript stack trace if available.
  1301. */
  1302. stackTrace?: StackTrace;
  1303. /**
  1304. * Exception object if available.
  1305. */
  1306. exception?: RemoteObject;
  1307. /**
  1308. * Identifier of the context where exception happened.
  1309. */
  1310. executionContextId?: ExecutionContextId;
  1311. }
  1312. /**
  1313. * Number of milliseconds since epoch.
  1314. */
  1315. type Timestamp = number;
  1316. /**
  1317. * Number of milliseconds.
  1318. */
  1319. type TimeDelta = number;
  1320. /**
  1321. * Stack entry for runtime errors and assertions.
  1322. */
  1323. interface CallFrame {
  1324. /**
  1325. * JavaScript function name.
  1326. */
  1327. functionName: string;
  1328. /**
  1329. * JavaScript script id.
  1330. */
  1331. scriptId: ScriptId;
  1332. /**
  1333. * JavaScript script name or url.
  1334. */
  1335. url: string;
  1336. /**
  1337. * JavaScript script line number (0-based).
  1338. */
  1339. lineNumber: number;
  1340. /**
  1341. * JavaScript script column number (0-based).
  1342. */
  1343. columnNumber: number;
  1344. }
  1345. /**
  1346. * Call frames for assertions or error messages.
  1347. */
  1348. interface StackTrace {
  1349. /**
  1350. * String label of this stack trace. For async traces this may be a name of the function that
  1351. * initiated the async call.
  1352. */
  1353. description?: string;
  1354. /**
  1355. * JavaScript function name.
  1356. */
  1357. callFrames: CallFrame[];
  1358. /**
  1359. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  1360. */
  1361. parent?: StackTrace;
  1362. /**
  1363. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  1364. * @experimental
  1365. */
  1366. parentId?: StackTraceId;
  1367. }
  1368. /**
  1369. * Unique identifier of current debugger.
  1370. * @experimental
  1371. */
  1372. type UniqueDebuggerId = string;
  1373. /**
  1374. * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This
  1375. * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.
  1376. * @experimental
  1377. */
  1378. interface StackTraceId {
  1379. id: string;
  1380. debuggerId?: UniqueDebuggerId;
  1381. }
  1382. interface AwaitPromiseParameterType {
  1383. /**
  1384. * Identifier of the promise.
  1385. */
  1386. promiseObjectId: RemoteObjectId;
  1387. /**
  1388. * Whether the result is expected to be a JSON object that should be sent by value.
  1389. */
  1390. returnByValue?: boolean;
  1391. /**
  1392. * Whether preview should be generated for the result.
  1393. */
  1394. generatePreview?: boolean;
  1395. }
  1396. interface CallFunctionOnParameterType {
  1397. /**
  1398. * Declaration of the function to call.
  1399. */
  1400. functionDeclaration: string;
  1401. /**
  1402. * Identifier of the object to call function on. Either objectId or executionContextId should
  1403. * be specified.
  1404. */
  1405. objectId?: RemoteObjectId;
  1406. /**
  1407. * Call arguments. All call arguments must belong to the same JavaScript world as the target
  1408. * object.
  1409. */
  1410. arguments?: CallArgument[];
  1411. /**
  1412. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  1413. * execution. Overrides `setPauseOnException` state.
  1414. */
  1415. silent?: boolean;
  1416. /**
  1417. * Whether the result is expected to be a JSON object which should be sent by value.
  1418. */
  1419. returnByValue?: boolean;
  1420. /**
  1421. * Whether preview should be generated for the result.
  1422. * @experimental
  1423. */
  1424. generatePreview?: boolean;
  1425. /**
  1426. * Whether execution should be treated as initiated by user in the UI.
  1427. */
  1428. userGesture?: boolean;
  1429. /**
  1430. * Whether execution should `await` for resulting value and return once awaited promise is
  1431. * resolved.
  1432. */
  1433. awaitPromise?: boolean;
  1434. /**
  1435. * Specifies execution context which global object will be used to call function on. Either
  1436. * executionContextId or objectId should be specified.
  1437. */
  1438. executionContextId?: ExecutionContextId;
  1439. /**
  1440. * Symbolic group name that can be used to release multiple objects. If objectGroup is not
  1441. * specified and objectId is, objectGroup will be inherited from object.
  1442. */
  1443. objectGroup?: string;
  1444. }
  1445. interface CompileScriptParameterType {
  1446. /**
  1447. * Expression to compile.
  1448. */
  1449. expression: string;
  1450. /**
  1451. * Source url to be set for the script.
  1452. */
  1453. sourceURL: string;
  1454. /**
  1455. * Specifies whether the compiled script should be persisted.
  1456. */
  1457. persistScript: boolean;
  1458. /**
  1459. * Specifies in which execution context to perform script run. If the parameter is omitted the
  1460. * evaluation will be performed in the context of the inspected page.
  1461. */
  1462. executionContextId?: ExecutionContextId;
  1463. }
  1464. interface EvaluateParameterType {
  1465. /**
  1466. * Expression to evaluate.
  1467. */
  1468. expression: string;
  1469. /**
  1470. * Symbolic group name that can be used to release multiple objects.
  1471. */
  1472. objectGroup?: string;
  1473. /**
  1474. * Determines whether Command Line API should be available during the evaluation.
  1475. */
  1476. includeCommandLineAPI?: boolean;
  1477. /**
  1478. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  1479. * execution. Overrides `setPauseOnException` state.
  1480. */
  1481. silent?: boolean;
  1482. /**
  1483. * Specifies in which execution context to perform evaluation. If the parameter is omitted the
  1484. * evaluation will be performed in the context of the inspected page.
  1485. */
  1486. contextId?: ExecutionContextId;
  1487. /**
  1488. * Whether the result is expected to be a JSON object that should be sent by value.
  1489. */
  1490. returnByValue?: boolean;
  1491. /**
  1492. * Whether preview should be generated for the result.
  1493. * @experimental
  1494. */
  1495. generatePreview?: boolean;
  1496. /**
  1497. * Whether execution should be treated as initiated by user in the UI.
  1498. */
  1499. userGesture?: boolean;
  1500. /**
  1501. * Whether execution should `await` for resulting value and return once awaited promise is
  1502. * resolved.
  1503. */
  1504. awaitPromise?: boolean;
  1505. /**
  1506. * Whether to throw an exception if side effect cannot be ruled out during evaluation.
  1507. * @experimental
  1508. */
  1509. throwOnSideEffect?: boolean;
  1510. /**
  1511. * Terminate execution after timing out (number of milliseconds).
  1512. * @experimental
  1513. */
  1514. timeout?: TimeDelta;
  1515. }
  1516. interface GetPropertiesParameterType {
  1517. /**
  1518. * Identifier of the object to return properties for.
  1519. */
  1520. objectId: RemoteObjectId;
  1521. /**
  1522. * If true, returns properties belonging only to the element itself, not to its prototype
  1523. * chain.
  1524. */
  1525. ownProperties?: boolean;
  1526. /**
  1527. * If true, returns accessor properties (with getter/setter) only; internal properties are not
  1528. * returned either.
  1529. * @experimental
  1530. */
  1531. accessorPropertiesOnly?: boolean;
  1532. /**
  1533. * Whether preview should be generated for the results.
  1534. * @experimental
  1535. */
  1536. generatePreview?: boolean;
  1537. }
  1538. interface GlobalLexicalScopeNamesParameterType {
  1539. /**
  1540. * Specifies in which execution context to lookup global scope variables.
  1541. */
  1542. executionContextId?: ExecutionContextId;
  1543. }
  1544. interface QueryObjectsParameterType {
  1545. /**
  1546. * Identifier of the prototype to return objects for.
  1547. */
  1548. prototypeObjectId: RemoteObjectId;
  1549. /**
  1550. * Symbolic group name that can be used to release the results.
  1551. */
  1552. objectGroup?: string;
  1553. }
  1554. interface ReleaseObjectParameterType {
  1555. /**
  1556. * Identifier of the object to release.
  1557. */
  1558. objectId: RemoteObjectId;
  1559. }
  1560. interface ReleaseObjectGroupParameterType {
  1561. /**
  1562. * Symbolic object group name.
  1563. */
  1564. objectGroup: string;
  1565. }
  1566. interface RunScriptParameterType {
  1567. /**
  1568. * Id of the script to run.
  1569. */
  1570. scriptId: ScriptId;
  1571. /**
  1572. * Specifies in which execution context to perform script run. If the parameter is omitted the
  1573. * evaluation will be performed in the context of the inspected page.
  1574. */
  1575. executionContextId?: ExecutionContextId;
  1576. /**
  1577. * Symbolic group name that can be used to release multiple objects.
  1578. */
  1579. objectGroup?: string;
  1580. /**
  1581. * In silent mode exceptions thrown during evaluation are not reported and do not pause
  1582. * execution. Overrides `setPauseOnException` state.
  1583. */
  1584. silent?: boolean;
  1585. /**
  1586. * Determines whether Command Line API should be available during the evaluation.
  1587. */
  1588. includeCommandLineAPI?: boolean;
  1589. /**
  1590. * Whether the result is expected to be a JSON object which should be sent by value.
  1591. */
  1592. returnByValue?: boolean;
  1593. /**
  1594. * Whether preview should be generated for the result.
  1595. */
  1596. generatePreview?: boolean;
  1597. /**
  1598. * Whether execution should `await` for resulting value and return once awaited promise is
  1599. * resolved.
  1600. */
  1601. awaitPromise?: boolean;
  1602. }
  1603. interface SetAsyncCallStackDepthParameterType {
  1604. /**
  1605. * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async
  1606. * call stacks (default).
  1607. */
  1608. maxDepth: number;
  1609. }
  1610. interface SetCustomObjectFormatterEnabledParameterType {
  1611. enabled: boolean;
  1612. }
  1613. interface SetMaxCallStackSizeToCaptureParameterType {
  1614. size: number;
  1615. }
  1616. interface AddBindingParameterType {
  1617. name: string;
  1618. executionContextId?: ExecutionContextId;
  1619. }
  1620. interface RemoveBindingParameterType {
  1621. name: string;
  1622. }
  1623. interface AwaitPromiseReturnType {
  1624. /**
  1625. * Promise result. Will contain rejected value if promise was rejected.
  1626. */
  1627. result: RemoteObject;
  1628. /**
  1629. * Exception details if stack strace is available.
  1630. */
  1631. exceptionDetails?: ExceptionDetails;
  1632. }
  1633. interface CallFunctionOnReturnType {
  1634. /**
  1635. * Call result.
  1636. */
  1637. result: RemoteObject;
  1638. /**
  1639. * Exception details.
  1640. */
  1641. exceptionDetails?: ExceptionDetails;
  1642. }
  1643. interface CompileScriptReturnType {
  1644. /**
  1645. * Id of the script.
  1646. */
  1647. scriptId?: ScriptId;
  1648. /**
  1649. * Exception details.
  1650. */
  1651. exceptionDetails?: ExceptionDetails;
  1652. }
  1653. interface EvaluateReturnType {
  1654. /**
  1655. * Evaluation result.
  1656. */
  1657. result: RemoteObject;
  1658. /**
  1659. * Exception details.
  1660. */
  1661. exceptionDetails?: ExceptionDetails;
  1662. }
  1663. interface GetIsolateIdReturnType {
  1664. /**
  1665. * The isolate id.
  1666. */
  1667. id: string;
  1668. }
  1669. interface GetHeapUsageReturnType {
  1670. /**
  1671. * Used heap size in bytes.
  1672. */
  1673. usedSize: number;
  1674. /**
  1675. * Allocated heap size in bytes.
  1676. */
  1677. totalSize: number;
  1678. }
  1679. interface GetPropertiesReturnType {
  1680. /**
  1681. * Object properties.
  1682. */
  1683. result: PropertyDescriptor[];
  1684. /**
  1685. * Internal object properties (only of the element itself).
  1686. */
  1687. internalProperties?: InternalPropertyDescriptor[];
  1688. /**
  1689. * Exception details.
  1690. */
  1691. exceptionDetails?: ExceptionDetails;
  1692. }
  1693. interface GlobalLexicalScopeNamesReturnType {
  1694. names: string[];
  1695. }
  1696. interface QueryObjectsReturnType {
  1697. /**
  1698. * Array with objects.
  1699. */
  1700. objects: RemoteObject;
  1701. }
  1702. interface RunScriptReturnType {
  1703. /**
  1704. * Run result.
  1705. */
  1706. result: RemoteObject;
  1707. /**
  1708. * Exception details.
  1709. */
  1710. exceptionDetails?: ExceptionDetails;
  1711. }
  1712. interface BindingCalledEventDataType {
  1713. name: string;
  1714. payload: string;
  1715. /**
  1716. * Identifier of the context where the call was made.
  1717. */
  1718. executionContextId: ExecutionContextId;
  1719. }
  1720. interface ConsoleAPICalledEventDataType {
  1721. /**
  1722. * Type of the call.
  1723. */
  1724. type: string;
  1725. /**
  1726. * Call arguments.
  1727. */
  1728. args: RemoteObject[];
  1729. /**
  1730. * Identifier of the context where the call was made.
  1731. */
  1732. executionContextId: ExecutionContextId;
  1733. /**
  1734. * Call timestamp.
  1735. */
  1736. timestamp: Timestamp;
  1737. /**
  1738. * Stack trace captured when the call was made.
  1739. */
  1740. stackTrace?: StackTrace;
  1741. /**
  1742. * Console context descriptor for calls on non-default console context (not console.*):
  1743. * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call
  1744. * on named context.
  1745. * @experimental
  1746. */
  1747. context?: string;
  1748. }
  1749. interface ExceptionRevokedEventDataType {
  1750. /**
  1751. * Reason describing why exception was revoked.
  1752. */
  1753. reason: string;
  1754. /**
  1755. * The id of revoked exception, as reported in `exceptionThrown`.
  1756. */
  1757. exceptionId: number;
  1758. }
  1759. interface ExceptionThrownEventDataType {
  1760. /**
  1761. * Timestamp of the exception.
  1762. */
  1763. timestamp: Timestamp;
  1764. exceptionDetails: ExceptionDetails;
  1765. }
  1766. interface ExecutionContextCreatedEventDataType {
  1767. /**
  1768. * A newly created execution context.
  1769. */
  1770. context: ExecutionContextDescription;
  1771. }
  1772. interface ExecutionContextDestroyedEventDataType {
  1773. /**
  1774. * Id of the destroyed context
  1775. */
  1776. executionContextId: ExecutionContextId;
  1777. }
  1778. interface InspectRequestedEventDataType {
  1779. object: RemoteObject;
  1780. hints: {};
  1781. }
  1782. }
  1783. namespace Schema {
  1784. /**
  1785. * Description of the protocol domain.
  1786. */
  1787. interface Domain {
  1788. /**
  1789. * Domain name.
  1790. */
  1791. name: string;
  1792. /**
  1793. * Domain version.
  1794. */
  1795. version: string;
  1796. }
  1797. interface GetDomainsReturnType {
  1798. /**
  1799. * List of supported domains.
  1800. */
  1801. domains: Domain[];
  1802. }
  1803. }
  1804. namespace NodeTracing {
  1805. interface TraceConfig {
  1806. /**
  1807. * Controls how the trace buffer stores data.
  1808. */
  1809. recordMode?: string;
  1810. /**
  1811. * Included category filters.
  1812. */
  1813. includedCategories: string[];
  1814. }
  1815. interface StartParameterType {
  1816. traceConfig: TraceConfig;
  1817. }
  1818. interface GetCategoriesReturnType {
  1819. /**
  1820. * A list of supported tracing categories.
  1821. */
  1822. categories: string[];
  1823. }
  1824. interface DataCollectedEventDataType {
  1825. value: Array<{}>;
  1826. }
  1827. }
  1828. namespace NodeWorker {
  1829. type WorkerID = string;
  1830. /**
  1831. * Unique identifier of attached debugging session.
  1832. */
  1833. type SessionID = string;
  1834. interface WorkerInfo {
  1835. workerId: WorkerID;
  1836. type: string;
  1837. title: string;
  1838. url: string;
  1839. }
  1840. interface SendMessageToWorkerParameterType {
  1841. message: string;
  1842. /**
  1843. * Identifier of the session.
  1844. */
  1845. sessionId: SessionID;
  1846. }
  1847. interface EnableParameterType {
  1848. /**
  1849. * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
  1850. * message to run them.
  1851. */
  1852. waitForDebuggerOnStart: boolean;
  1853. }
  1854. interface AttachedToWorkerEventDataType {
  1855. /**
  1856. * Identifier assigned to the session used to send/receive messages.
  1857. */
  1858. sessionId: SessionID;
  1859. workerInfo: WorkerInfo;
  1860. waitingForDebugger: boolean;
  1861. }
  1862. interface DetachedFromWorkerEventDataType {
  1863. /**
  1864. * Detached session identifier.
  1865. */
  1866. sessionId: SessionID;
  1867. }
  1868. interface ReceivedMessageFromWorkerEventDataType {
  1869. /**
  1870. * Identifier of a session which sends a message.
  1871. */
  1872. sessionId: SessionID;
  1873. message: string;
  1874. }
  1875. }
  1876. /**
  1877. * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
  1878. */
  1879. class Session extends EventEmitter {
  1880. /**
  1881. * Create a new instance of the inspector.Session class.
  1882. * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
  1883. */
  1884. constructor();
  1885. /**
  1886. * Connects a session to the inspector back-end.
  1887. * An exception will be thrown if there is already a connected session established either
  1888. * through the API or by a front-end connected to the Inspector WebSocket port.
  1889. */
  1890. connect(): void;
  1891. /**
  1892. * Immediately close the session. All pending message callbacks will be called with an error.
  1893. * session.connect() will need to be called to be able to send messages again.
  1894. * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
  1895. */
  1896. disconnect(): void;
  1897. /**
  1898. * Posts a message to the inspector back-end. callback will be notified when a response is received.
  1899. * callback is a function that accepts two optional arguments - error and message-specific result.
  1900. */
  1901. post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
  1902. post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
  1903. /**
  1904. * Does nothing.
  1905. */
  1906. post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
  1907. /**
  1908. * Disables console domain, prevents further console messages from being reported to the client.
  1909. */
  1910. post(method: "Console.disable", callback?: (err: Error | null) => void): void;
  1911. /**
  1912. * Enables console domain, sends the messages collected so far to the client by means of the
  1913. * `messageAdded` notification.
  1914. */
  1915. post(method: "Console.enable", callback?: (err: Error | null) => void): void;
  1916. /**
  1917. * Continues execution until specific location is reached.
  1918. */
  1919. post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
  1920. post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
  1921. /**
  1922. * Disables debugger for given page.
  1923. */
  1924. post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
  1925. /**
  1926. * Enables debugger for the given page. Clients should not assume that the debugging has been
  1927. * enabled until the result for this command is received.
  1928. */
  1929. post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
  1930. /**
  1931. * Evaluates expression on a given call frame.
  1932. */
  1933. post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
  1934. post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
  1935. /**
  1936. * Returns possible locations for breakpoint. scriptId in start and end range locations should be
  1937. * the same.
  1938. */
  1939. post(
  1940. method: "Debugger.getPossibleBreakpoints",
  1941. params?: Debugger.GetPossibleBreakpointsParameterType,
  1942. callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
  1943. ): void;
  1944. post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
  1945. /**
  1946. * Returns source for the script with given id.
  1947. */
  1948. post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
  1949. post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
  1950. /**
  1951. * Returns stack trace with given `stackTraceId`.
  1952. * @experimental
  1953. */
  1954. post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
  1955. post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
  1956. /**
  1957. * Stops on the next JavaScript statement.
  1958. */
  1959. post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
  1960. /**
  1961. * @experimental
  1962. */
  1963. post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
  1964. post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
  1965. /**
  1966. * Removes JavaScript breakpoint.
  1967. */
  1968. post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
  1969. post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
  1970. /**
  1971. * Restarts particular call frame from the beginning.
  1972. */
  1973. post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
  1974. post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
  1975. /**
  1976. * Resumes JavaScript execution.
  1977. */
  1978. post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
  1979. /**
  1980. * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and
  1981. * Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled
  1982. * before next pause. Returns success when async task is actually scheduled, returns error if no
  1983. * task were scheduled or another scheduleStepIntoAsync was called.
  1984. * @experimental
  1985. */
  1986. post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
  1987. /**
  1988. * Searches for given string in script content.
  1989. */
  1990. post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
  1991. post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
  1992. /**
  1993. * Enables or disables async call stacks tracking.
  1994. */
  1995. post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
  1996. post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
  1997. /**
  1998. * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
  1999. * scripts with url matching one of the patterns. VM will try to leave blackboxed script by
  2000. * performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  2001. * @experimental
  2002. */
  2003. post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
  2004. post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
  2005. /**
  2006. * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
  2007. * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  2008. * Positions array contains positions where blackbox state is changed. First interval isn't
  2009. * blackboxed. Array should be sorted.
  2010. * @experimental
  2011. */
  2012. post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
  2013. post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
  2014. /**
  2015. * Sets JavaScript breakpoint at a given location.
  2016. */
  2017. post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
  2018. post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
  2019. /**
  2020. * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
  2021. * command is issued, all existing parsed scripts will have breakpoints resolved and returned in
  2022. * `locations` property. Further matching script parsing will result in subsequent
  2023. * `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
  2024. */
  2025. post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
  2026. post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
  2027. /**
  2028. * Sets JavaScript breakpoint before each call to the given function.
  2029. * If another function was created from the same source as a given one,
  2030. * calling it will also trigger the breakpoint.
  2031. * @experimental
  2032. */
  2033. post(
  2034. method: "Debugger.setBreakpointOnFunctionCall",
  2035. params?: Debugger.SetBreakpointOnFunctionCallParameterType,
  2036. callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void
  2037. ): void;
  2038. post(method: "Debugger.setBreakpointOnFunctionCall", callback?: (err: Error | null, params: Debugger.SetBreakpointOnFunctionCallReturnType) => void): void;
  2039. /**
  2040. * Activates / deactivates all breakpoints on the page.
  2041. */
  2042. post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
  2043. post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
  2044. /**
  2045. * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
  2046. * no exceptions. Initial pause on exceptions state is `none`.
  2047. */
  2048. post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
  2049. post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
  2050. /**
  2051. * Changes return value in top frame. Available only at return break position.
  2052. * @experimental
  2053. */
  2054. post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
  2055. post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
  2056. /**
  2057. * Edits JavaScript source live.
  2058. */
  2059. post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
  2060. post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
  2061. /**
  2062. * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  2063. */
  2064. post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
  2065. post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
  2066. /**
  2067. * Changes value of variable in a callframe. Object-based scopes are not supported and must be
  2068. * mutated manually.
  2069. */
  2070. post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
  2071. post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
  2072. /**
  2073. * Steps into the function call.
  2074. */
  2075. post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
  2076. post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
  2077. /**
  2078. * Steps out of the function call.
  2079. */
  2080. post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
  2081. /**
  2082. * Steps over the statement.
  2083. */
  2084. post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
  2085. /**
  2086. * Enables console to refer to the node with given id via $x (see Command Line API for more details
  2087. * $x functions).
  2088. */
  2089. post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
  2090. post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
  2091. post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
  2092. post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
  2093. post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
  2094. post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
  2095. post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
  2096. post(
  2097. method: "HeapProfiler.getObjectByHeapObjectId",
  2098. params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
  2099. callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
  2100. ): void;
  2101. post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
  2102. post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
  2103. post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
  2104. post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
  2105. post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
  2106. post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
  2107. post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
  2108. post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
  2109. post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
  2110. post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
  2111. post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
  2112. post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
  2113. post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
  2114. /**
  2115. * Collect coverage data for the current isolate. The coverage data may be incomplete due to
  2116. * garbage collection.
  2117. */
  2118. post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
  2119. /**
  2120. * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  2121. */
  2122. post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
  2123. post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
  2124. post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
  2125. /**
  2126. * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
  2127. * coverage may be incomplete. Enabling prevents running optimized code and resets execution
  2128. * counters.
  2129. */
  2130. post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
  2131. post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
  2132. /**
  2133. * Enable type profile.
  2134. * @experimental
  2135. */
  2136. post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
  2137. post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
  2138. /**
  2139. * Disable precise code coverage. Disabling releases unnecessary execution count records and allows
  2140. * executing optimized code.
  2141. */
  2142. post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
  2143. /**
  2144. * Disable type profile. Disabling releases type profile data collected so far.
  2145. * @experimental
  2146. */
  2147. post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
  2148. /**
  2149. * Collect coverage data for the current isolate, and resets execution counters. Precise code
  2150. * coverage needs to have started.
  2151. */
  2152. post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
  2153. /**
  2154. * Collect type profile.
  2155. * @experimental
  2156. */
  2157. post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
  2158. /**
  2159. * Add handler to promise with given promise object id.
  2160. */
  2161. post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
  2162. post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
  2163. /**
  2164. * Calls function with given declaration on the given object. Object group of the result is
  2165. * inherited from the target object.
  2166. */
  2167. post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
  2168. post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
  2169. /**
  2170. * Compiles expression.
  2171. */
  2172. post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
  2173. post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
  2174. /**
  2175. * Disables reporting of execution contexts creation.
  2176. */
  2177. post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
  2178. /**
  2179. * Discards collected exceptions and console API calls.
  2180. */
  2181. post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
  2182. /**
  2183. * Enables reporting of execution contexts creation by means of `executionContextCreated` event.
  2184. * When the reporting gets enabled the event will be sent immediately for each existing execution
  2185. * context.
  2186. */
  2187. post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
  2188. /**
  2189. * Evaluates expression on global object.
  2190. */
  2191. post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
  2192. post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
  2193. /**
  2194. * Returns the isolate id.
  2195. * @experimental
  2196. */
  2197. post(method: "Runtime.getIsolateId", callback?: (err: Error | null, params: Runtime.GetIsolateIdReturnType) => void): void;
  2198. /**
  2199. * Returns the JavaScript heap usage.
  2200. * It is the total usage of the corresponding isolate not scoped to a particular Runtime.
  2201. * @experimental
  2202. */
  2203. post(method: "Runtime.getHeapUsage", callback?: (err: Error | null, params: Runtime.GetHeapUsageReturnType) => void): void;
  2204. /**
  2205. * Returns properties of a given object. Object group of the result is inherited from the target
  2206. * object.
  2207. */
  2208. post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
  2209. post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
  2210. /**
  2211. * Returns all let, const and class variables from global scope.
  2212. */
  2213. post(
  2214. method: "Runtime.globalLexicalScopeNames",
  2215. params?: Runtime.GlobalLexicalScopeNamesParameterType,
  2216. callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
  2217. ): void;
  2218. post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
  2219. post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
  2220. post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
  2221. /**
  2222. * Releases remote object with given id.
  2223. */
  2224. post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
  2225. post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
  2226. /**
  2227. * Releases all remote objects that belong to a given group.
  2228. */
  2229. post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
  2230. post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
  2231. /**
  2232. * Tells inspected instance to run if it was waiting for debugger to attach.
  2233. */
  2234. post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
  2235. /**
  2236. * Runs script with given id in a given context.
  2237. */
  2238. post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
  2239. post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
  2240. /**
  2241. * Enables or disables async call stacks tracking.
  2242. */
  2243. post(method: "Runtime.setAsyncCallStackDepth", params?: Runtime.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
  2244. post(method: "Runtime.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
  2245. /**
  2246. * @experimental
  2247. */
  2248. post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
  2249. post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
  2250. /**
  2251. * @experimental
  2252. */
  2253. post(method: "Runtime.setMaxCallStackSizeToCapture", params?: Runtime.SetMaxCallStackSizeToCaptureParameterType, callback?: (err: Error | null) => void): void;
  2254. post(method: "Runtime.setMaxCallStackSizeToCapture", callback?: (err: Error | null) => void): void;
  2255. /**
  2256. * Terminate current or next JavaScript execution.
  2257. * Will cancel the termination when the outer-most script execution ends.
  2258. * @experimental
  2259. */
  2260. post(method: "Runtime.terminateExecution", callback?: (err: Error | null) => void): void;
  2261. /**
  2262. * If executionContextId is empty, adds binding with the given name on the
  2263. * global objects of all inspected contexts, including those created later,
  2264. * bindings survive reloads.
  2265. * If executionContextId is specified, adds binding only on global object of
  2266. * given execution context.
  2267. * Binding function takes exactly one argument, this argument should be string,
  2268. * in case of any other input, function throws an exception.
  2269. * Each binding function call produces Runtime.bindingCalled notification.
  2270. * @experimental
  2271. */
  2272. post(method: "Runtime.addBinding", params?: Runtime.AddBindingParameterType, callback?: (err: Error | null) => void): void;
  2273. post(method: "Runtime.addBinding", callback?: (err: Error | null) => void): void;
  2274. /**
  2275. * This method does not remove binding function from global object but
  2276. * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
  2277. * @experimental
  2278. */
  2279. post(method: "Runtime.removeBinding", params?: Runtime.RemoveBindingParameterType, callback?: (err: Error | null) => void): void;
  2280. post(method: "Runtime.removeBinding", callback?: (err: Error | null) => void): void;
  2281. /**
  2282. * Returns supported domains.
  2283. */
  2284. post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
  2285. /**
  2286. * Gets supported tracing categories.
  2287. */
  2288. post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
  2289. /**
  2290. * Start trace events collection.
  2291. */
  2292. post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
  2293. post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
  2294. /**
  2295. * Stop trace events collection. Remaining collected events will be sent as a sequence of
  2296. * dataCollected events followed by tracingComplete event.
  2297. */
  2298. post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
  2299. /**
  2300. * Sends protocol message over session with given id.
  2301. */
  2302. post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
  2303. post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
  2304. /**
  2305. * Instructs the inspector to attach to running workers. Will also attach to new workers
  2306. * as they start
  2307. */
  2308. post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
  2309. post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
  2310. /**
  2311. * Detaches from all running workers and disables attaching to new workers as they are started.
  2312. */
  2313. post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
  2314. // Events
  2315. addListener(event: string, listener: (...args: any[]) => void): this;
  2316. /**
  2317. * Emitted when any notification from the V8 Inspector is received.
  2318. */
  2319. addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
  2320. /**
  2321. * Issued when new console message is added.
  2322. */
  2323. addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2324. /**
  2325. * Fired when breakpoint is resolved to an actual script and location.
  2326. */
  2327. addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2328. /**
  2329. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2330. */
  2331. addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2332. /**
  2333. * Fired when the virtual machine resumed execution.
  2334. */
  2335. addListener(event: "Debugger.resumed", listener: () => void): this;
  2336. /**
  2337. * Fired when virtual machine fails to parse the script.
  2338. */
  2339. addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2340. /**
  2341. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  2342. * scripts upon enabling debugger.
  2343. */
  2344. addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2345. addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2346. /**
  2347. * If heap objects tracking has been started then backend may send update for one or more fragments
  2348. */
  2349. addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2350. /**
  2351. * If heap objects tracking has been started then backend regularly sends a current value for last
  2352. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  2353. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2354. */
  2355. addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2356. addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2357. addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2358. addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2359. /**
  2360. * Sent when new profile recording is started using console.profile() call.
  2361. */
  2362. addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2363. /**
  2364. * Notification is issued every time when binding is called.
  2365. * @experimental
  2366. */
  2367. addListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
  2368. /**
  2369. * Issued when console API was called.
  2370. */
  2371. addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2372. /**
  2373. * Issued when unhandled exception was revoked.
  2374. */
  2375. addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2376. /**
  2377. * Issued when exception was thrown and unhandled.
  2378. */
  2379. addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2380. /**
  2381. * Issued when new execution context is created.
  2382. */
  2383. addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2384. /**
  2385. * Issued when execution context is destroyed.
  2386. */
  2387. addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2388. /**
  2389. * Issued when all executionContexts were cleared in browser
  2390. */
  2391. addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2392. /**
  2393. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2394. * call).
  2395. */
  2396. addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2397. /**
  2398. * Contains an bucket of collected trace events.
  2399. */
  2400. addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2401. /**
  2402. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2403. * delivered via dataCollected events.
  2404. */
  2405. addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2406. /**
  2407. * Issued when attached to a worker.
  2408. */
  2409. addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2410. /**
  2411. * Issued when detached from the worker.
  2412. */
  2413. addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2414. /**
  2415. * Notifies about a new protocol message received from the session
  2416. * (session ID is provided in attachedToWorker notification).
  2417. */
  2418. addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2419. emit(event: string | symbol, ...args: any[]): boolean;
  2420. emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
  2421. emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
  2422. emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
  2423. emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
  2424. emit(event: "Debugger.resumed"): boolean;
  2425. emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
  2426. emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
  2427. emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
  2428. emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
  2429. emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
  2430. emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
  2431. emit(event: "HeapProfiler.resetProfiles"): boolean;
  2432. emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
  2433. emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
  2434. emit(event: "Runtime.bindingCalled", message: InspectorNotification<Runtime.BindingCalledEventDataType>): boolean;
  2435. emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
  2436. emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
  2437. emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
  2438. emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
  2439. emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
  2440. emit(event: "Runtime.executionContextsCleared"): boolean;
  2441. emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
  2442. emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
  2443. emit(event: "NodeTracing.tracingComplete"): boolean;
  2444. emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
  2445. emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
  2446. emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
  2447. on(event: string, listener: (...args: any[]) => void): this;
  2448. /**
  2449. * Emitted when any notification from the V8 Inspector is received.
  2450. */
  2451. on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
  2452. /**
  2453. * Issued when new console message is added.
  2454. */
  2455. on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2456. /**
  2457. * Fired when breakpoint is resolved to an actual script and location.
  2458. */
  2459. on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2460. /**
  2461. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2462. */
  2463. on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2464. /**
  2465. * Fired when the virtual machine resumed execution.
  2466. */
  2467. on(event: "Debugger.resumed", listener: () => void): this;
  2468. /**
  2469. * Fired when virtual machine fails to parse the script.
  2470. */
  2471. on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2472. /**
  2473. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  2474. * scripts upon enabling debugger.
  2475. */
  2476. on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2477. on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2478. /**
  2479. * If heap objects tracking has been started then backend may send update for one or more fragments
  2480. */
  2481. on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2482. /**
  2483. * If heap objects tracking has been started then backend regularly sends a current value for last
  2484. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  2485. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2486. */
  2487. on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2488. on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2489. on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2490. on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2491. /**
  2492. * Sent when new profile recording is started using console.profile() call.
  2493. */
  2494. on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2495. /**
  2496. * Notification is issued every time when binding is called.
  2497. * @experimental
  2498. */
  2499. on(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
  2500. /**
  2501. * Issued when console API was called.
  2502. */
  2503. on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2504. /**
  2505. * Issued when unhandled exception was revoked.
  2506. */
  2507. on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2508. /**
  2509. * Issued when exception was thrown and unhandled.
  2510. */
  2511. on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2512. /**
  2513. * Issued when new execution context is created.
  2514. */
  2515. on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2516. /**
  2517. * Issued when execution context is destroyed.
  2518. */
  2519. on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2520. /**
  2521. * Issued when all executionContexts were cleared in browser
  2522. */
  2523. on(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2524. /**
  2525. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2526. * call).
  2527. */
  2528. on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2529. /**
  2530. * Contains an bucket of collected trace events.
  2531. */
  2532. on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2533. /**
  2534. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2535. * delivered via dataCollected events.
  2536. */
  2537. on(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2538. /**
  2539. * Issued when attached to a worker.
  2540. */
  2541. on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2542. /**
  2543. * Issued when detached from the worker.
  2544. */
  2545. on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2546. /**
  2547. * Notifies about a new protocol message received from the session
  2548. * (session ID is provided in attachedToWorker notification).
  2549. */
  2550. on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2551. once(event: string, listener: (...args: any[]) => void): this;
  2552. /**
  2553. * Emitted when any notification from the V8 Inspector is received.
  2554. */
  2555. once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
  2556. /**
  2557. * Issued when new console message is added.
  2558. */
  2559. once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2560. /**
  2561. * Fired when breakpoint is resolved to an actual script and location.
  2562. */
  2563. once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2564. /**
  2565. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2566. */
  2567. once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2568. /**
  2569. * Fired when the virtual machine resumed execution.
  2570. */
  2571. once(event: "Debugger.resumed", listener: () => void): this;
  2572. /**
  2573. * Fired when virtual machine fails to parse the script.
  2574. */
  2575. once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2576. /**
  2577. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  2578. * scripts upon enabling debugger.
  2579. */
  2580. once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2581. once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2582. /**
  2583. * If heap objects tracking has been started then backend may send update for one or more fragments
  2584. */
  2585. once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2586. /**
  2587. * If heap objects tracking has been started then backend regularly sends a current value for last
  2588. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  2589. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2590. */
  2591. once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2592. once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2593. once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2594. once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2595. /**
  2596. * Sent when new profile recording is started using console.profile() call.
  2597. */
  2598. once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2599. /**
  2600. * Notification is issued every time when binding is called.
  2601. * @experimental
  2602. */
  2603. once(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
  2604. /**
  2605. * Issued when console API was called.
  2606. */
  2607. once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2608. /**
  2609. * Issued when unhandled exception was revoked.
  2610. */
  2611. once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2612. /**
  2613. * Issued when exception was thrown and unhandled.
  2614. */
  2615. once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2616. /**
  2617. * Issued when new execution context is created.
  2618. */
  2619. once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2620. /**
  2621. * Issued when execution context is destroyed.
  2622. */
  2623. once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2624. /**
  2625. * Issued when all executionContexts were cleared in browser
  2626. */
  2627. once(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2628. /**
  2629. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2630. * call).
  2631. */
  2632. once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2633. /**
  2634. * Contains an bucket of collected trace events.
  2635. */
  2636. once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2637. /**
  2638. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2639. * delivered via dataCollected events.
  2640. */
  2641. once(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2642. /**
  2643. * Issued when attached to a worker.
  2644. */
  2645. once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2646. /**
  2647. * Issued when detached from the worker.
  2648. */
  2649. once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2650. /**
  2651. * Notifies about a new protocol message received from the session
  2652. * (session ID is provided in attachedToWorker notification).
  2653. */
  2654. once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2655. prependListener(event: string, listener: (...args: any[]) => void): this;
  2656. /**
  2657. * Emitted when any notification from the V8 Inspector is received.
  2658. */
  2659. prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
  2660. /**
  2661. * Issued when new console message is added.
  2662. */
  2663. prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2664. /**
  2665. * Fired when breakpoint is resolved to an actual script and location.
  2666. */
  2667. prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2668. /**
  2669. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2670. */
  2671. prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2672. /**
  2673. * Fired when the virtual machine resumed execution.
  2674. */
  2675. prependListener(event: "Debugger.resumed", listener: () => void): this;
  2676. /**
  2677. * Fired when virtual machine fails to parse the script.
  2678. */
  2679. prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2680. /**
  2681. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  2682. * scripts upon enabling debugger.
  2683. */
  2684. prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2685. prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2686. /**
  2687. * If heap objects tracking has been started then backend may send update for one or more fragments
  2688. */
  2689. prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2690. /**
  2691. * If heap objects tracking has been started then backend regularly sends a current value for last
  2692. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  2693. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2694. */
  2695. prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2696. prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2697. prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2698. prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2699. /**
  2700. * Sent when new profile recording is started using console.profile() call.
  2701. */
  2702. prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2703. /**
  2704. * Notification is issued every time when binding is called.
  2705. * @experimental
  2706. */
  2707. prependListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
  2708. /**
  2709. * Issued when console API was called.
  2710. */
  2711. prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2712. /**
  2713. * Issued when unhandled exception was revoked.
  2714. */
  2715. prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2716. /**
  2717. * Issued when exception was thrown and unhandled.
  2718. */
  2719. prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2720. /**
  2721. * Issued when new execution context is created.
  2722. */
  2723. prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2724. /**
  2725. * Issued when execution context is destroyed.
  2726. */
  2727. prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2728. /**
  2729. * Issued when all executionContexts were cleared in browser
  2730. */
  2731. prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2732. /**
  2733. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2734. * call).
  2735. */
  2736. prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2737. /**
  2738. * Contains an bucket of collected trace events.
  2739. */
  2740. prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2741. /**
  2742. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2743. * delivered via dataCollected events.
  2744. */
  2745. prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2746. /**
  2747. * Issued when attached to a worker.
  2748. */
  2749. prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2750. /**
  2751. * Issued when detached from the worker.
  2752. */
  2753. prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2754. /**
  2755. * Notifies about a new protocol message received from the session
  2756. * (session ID is provided in attachedToWorker notification).
  2757. */
  2758. prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2759. prependOnceListener(event: string, listener: (...args: any[]) => void): this;
  2760. /**
  2761. * Emitted when any notification from the V8 Inspector is received.
  2762. */
  2763. prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
  2764. /**
  2765. * Issued when new console message is added.
  2766. */
  2767. prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2768. /**
  2769. * Fired when breakpoint is resolved to an actual script and location.
  2770. */
  2771. prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2772. /**
  2773. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2774. */
  2775. prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2776. /**
  2777. * Fired when the virtual machine resumed execution.
  2778. */
  2779. prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
  2780. /**
  2781. * Fired when virtual machine fails to parse the script.
  2782. */
  2783. prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2784. /**
  2785. * Fired when virtual machine parses script. This event is also fired for all known and uncollected
  2786. * scripts upon enabling debugger.
  2787. */
  2788. prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2789. prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2790. /**
  2791. * If heap objects tracking has been started then backend may send update for one or more fragments
  2792. */
  2793. prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2794. /**
  2795. * If heap objects tracking has been started then backend regularly sends a current value for last
  2796. * seen object id and corresponding timestamp. If the were changes in the heap since last event
  2797. * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2798. */
  2799. prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2800. prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2801. prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2802. prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2803. /**
  2804. * Sent when new profile recording is started using console.profile() call.
  2805. */
  2806. prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2807. /**
  2808. * Notification is issued every time when binding is called.
  2809. * @experimental
  2810. */
  2811. prependOnceListener(event: "Runtime.bindingCalled", listener: (message: InspectorNotification<Runtime.BindingCalledEventDataType>) => void): this;
  2812. /**
  2813. * Issued when console API was called.
  2814. */
  2815. prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2816. /**
  2817. * Issued when unhandled exception was revoked.
  2818. */
  2819. prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2820. /**
  2821. * Issued when exception was thrown and unhandled.
  2822. */
  2823. prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2824. /**
  2825. * Issued when new execution context is created.
  2826. */
  2827. prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2828. /**
  2829. * Issued when execution context is destroyed.
  2830. */
  2831. prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2832. /**
  2833. * Issued when all executionContexts were cleared in browser
  2834. */
  2835. prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2836. /**
  2837. * Issued when object should be inspected (for example, as a result of inspect() command line API
  2838. * call).
  2839. */
  2840. prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2841. /**
  2842. * Contains an bucket of collected trace events.
  2843. */
  2844. prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2845. /**
  2846. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2847. * delivered via dataCollected events.
  2848. */
  2849. prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2850. /**
  2851. * Issued when attached to a worker.
  2852. */
  2853. prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2854. /**
  2855. * Issued when detached from the worker.
  2856. */
  2857. prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2858. /**
  2859. * Notifies about a new protocol message received from the session
  2860. * (session ID is provided in attachedToWorker notification).
  2861. */
  2862. prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2863. }
  2864. // Top Level API
  2865. /**
  2866. * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
  2867. * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.
  2868. * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
  2869. * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
  2870. * @param wait Block until a client has connected. Optional, defaults to false.
  2871. */
  2872. function open(port?: number, host?: string, wait?: boolean): void;
  2873. /**
  2874. * Deactivate the inspector. Blocks until there are no active connections.
  2875. */
  2876. function close(): void;
  2877. /**
  2878. * Return the URL of the active inspector, or `undefined` if there is none.
  2879. */
  2880. function url(): string | undefined;
  2881. }