ae156100c256d1fc488815568e3640bf8b69520756d4409a71b4cfd0cc867bde376f92490f71d89a8b6d387796b96c8e3632d305f9b9e64c579effc6dab9df 200 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052
  1. // These definitions are automatically generated by the generate-inspector script.
  2. // Do not edit this file directly.
  3. // See scripts/generate-inspector/README.md for information on how to update the protocol definitions.
  4. // Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template).
  5. declare module "inspector" {
  6. interface InspectorNotification<T> {
  7. method: string;
  8. params: T;
  9. }
  10. namespace Schema {
  11. /**
  12. * Description of the protocol domain.
  13. */
  14. interface Domain {
  15. /**
  16. * Domain name.
  17. */
  18. name: string;
  19. /**
  20. * Domain version.
  21. */
  22. version: string;
  23. }
  24. interface GetDomainsReturnType {
  25. /**
  26. * List of supported domains.
  27. */
  28. domains: Domain[];
  29. }
  30. }
  31. namespace Runtime {
  32. /**
  33. * Unique script identifier.
  34. */
  35. type ScriptId = string;
  36. /**
  37. * Unique object identifier.
  38. */
  39. type RemoteObjectId = string;
  40. /**
  41. * Primitive value which cannot be JSON-stringified.
  42. */
  43. type UnserializableValue = string;
  44. /**
  45. * Mirror object referencing original JavaScript object.
  46. */
  47. interface RemoteObject {
  48. /**
  49. * Object type.
  50. */
  51. type: string;
  52. /**
  53. * Object subtype hint. Specified for <code>object</code> type values only.
  54. */
  55. subtype?: string | undefined;
  56. /**
  57. * Object class (constructor) name. Specified for <code>object</code> type values only.
  58. */
  59. className?: string | undefined;
  60. /**
  61. * Remote object value in case of primitive values or JSON values (if it was requested).
  62. */
  63. value?: any;
  64. /**
  65. * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
  66. */
  67. unserializableValue?: UnserializableValue | undefined;
  68. /**
  69. * String representation of the object.
  70. */
  71. description?: string | undefined;
  72. /**
  73. * Unique object identifier (for non-primitive values).
  74. */
  75. objectId?: RemoteObjectId | undefined;
  76. /**
  77. * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
  78. * @experimental
  79. */
  80. preview?: ObjectPreview | undefined;
  81. /**
  82. * @experimental
  83. */
  84. customPreview?: CustomPreview | undefined;
  85. }
  86. /**
  87. * @experimental
  88. */
  89. interface CustomPreview {
  90. header: string;
  91. hasBody: boolean;
  92. formatterObjectId: RemoteObjectId;
  93. bindRemoteObjectFunctionId: RemoteObjectId;
  94. configObjectId?: RemoteObjectId | undefined;
  95. }
  96. /**
  97. * Object containing abbreviated remote object value.
  98. * @experimental
  99. */
  100. interface ObjectPreview {
  101. /**
  102. * Object type.
  103. */
  104. type: string;
  105. /**
  106. * Object subtype hint. Specified for <code>object</code> type values only.
  107. */
  108. subtype?: string | undefined;
  109. /**
  110. * String representation of the object.
  111. */
  112. description?: string | undefined;
  113. /**
  114. * True iff some of the properties or entries of the original object did not fit.
  115. */
  116. overflow: boolean;
  117. /**
  118. * List of the properties.
  119. */
  120. properties: PropertyPreview[];
  121. /**
  122. * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
  123. */
  124. entries?: EntryPreview[] | undefined;
  125. }
  126. /**
  127. * @experimental
  128. */
  129. interface PropertyPreview {
  130. /**
  131. * Property name.
  132. */
  133. name: string;
  134. /**
  135. * Object type. Accessor means that the property itself is an accessor property.
  136. */
  137. type: string;
  138. /**
  139. * User-friendly property value string.
  140. */
  141. value?: string | undefined;
  142. /**
  143. * Nested value preview.
  144. */
  145. valuePreview?: ObjectPreview | undefined;
  146. /**
  147. * Object subtype hint. Specified for <code>object</code> type values only.
  148. */
  149. subtype?: string | undefined;
  150. }
  151. /**
  152. * @experimental
  153. */
  154. interface EntryPreview {
  155. /**
  156. * Preview of the key. Specified for map-like collection entries.
  157. */
  158. key?: ObjectPreview | undefined;
  159. /**
  160. * Preview of the value.
  161. */
  162. value: ObjectPreview;
  163. }
  164. /**
  165. * Object property descriptor.
  166. */
  167. interface PropertyDescriptor {
  168. /**
  169. * Property name or symbol description.
  170. */
  171. name: string;
  172. /**
  173. * The value associated with the property.
  174. */
  175. value?: RemoteObject | undefined;
  176. /**
  177. * True if the value associated with the property may be changed (data descriptors only).
  178. */
  179. writable?: boolean | undefined;
  180. /**
  181. * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
  182. */
  183. get?: RemoteObject | undefined;
  184. /**
  185. * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
  186. */
  187. set?: RemoteObject | undefined;
  188. /**
  189. * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
  190. */
  191. configurable: boolean;
  192. /**
  193. * True if this property shows up during enumeration of the properties on the corresponding object.
  194. */
  195. enumerable: boolean;
  196. /**
  197. * True if the result was thrown during the evaluation.
  198. */
  199. wasThrown?: boolean | undefined;
  200. /**
  201. * True if the property is owned for the object.
  202. */
  203. isOwn?: boolean | undefined;
  204. /**
  205. * Property symbol object, if the property is of the <code>symbol</code> type.
  206. */
  207. symbol?: RemoteObject | undefined;
  208. }
  209. /**
  210. * Object internal property descriptor. This property isn't normally visible in JavaScript code.
  211. */
  212. interface InternalPropertyDescriptor {
  213. /**
  214. * Conventional property name.
  215. */
  216. name: string;
  217. /**
  218. * The value associated with the property.
  219. */
  220. value?: RemoteObject | undefined;
  221. }
  222. /**
  223. * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
  224. */
  225. interface CallArgument {
  226. /**
  227. * Primitive value or serializable javascript object.
  228. */
  229. value?: any;
  230. /**
  231. * Primitive value which can not be JSON-stringified.
  232. */
  233. unserializableValue?: UnserializableValue | undefined;
  234. /**
  235. * Remote object handle.
  236. */
  237. objectId?: RemoteObjectId | undefined;
  238. }
  239. /**
  240. * Id of an execution context.
  241. */
  242. type ExecutionContextId = number;
  243. /**
  244. * Description of an isolated world.
  245. */
  246. interface ExecutionContextDescription {
  247. /**
  248. * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
  249. */
  250. id: ExecutionContextId;
  251. /**
  252. * Execution context origin.
  253. */
  254. origin: string;
  255. /**
  256. * Human readable name describing given context.
  257. */
  258. name: string;
  259. /**
  260. * Embedder-specific auxiliary data.
  261. */
  262. auxData?: object | undefined;
  263. }
  264. /**
  265. * Detailed information about exception (or error) that was thrown during script compilation or execution.
  266. */
  267. interface ExceptionDetails {
  268. /**
  269. * Exception id.
  270. */
  271. exceptionId: number;
  272. /**
  273. * Exception text, which should be used together with exception object when available.
  274. */
  275. text: string;
  276. /**
  277. * Line number of the exception location (0-based).
  278. */
  279. lineNumber: number;
  280. /**
  281. * Column number of the exception location (0-based).
  282. */
  283. columnNumber: number;
  284. /**
  285. * Script ID of the exception location.
  286. */
  287. scriptId?: ScriptId | undefined;
  288. /**
  289. * URL of the exception location, to be used when the script was not reported.
  290. */
  291. url?: string | undefined;
  292. /**
  293. * JavaScript stack trace if available.
  294. */
  295. stackTrace?: StackTrace | undefined;
  296. /**
  297. * Exception object if available.
  298. */
  299. exception?: RemoteObject | undefined;
  300. /**
  301. * Identifier of the context where exception happened.
  302. */
  303. executionContextId?: ExecutionContextId | undefined;
  304. }
  305. /**
  306. * Number of milliseconds since epoch.
  307. */
  308. type Timestamp = number;
  309. /**
  310. * Stack entry for runtime errors and assertions.
  311. */
  312. interface CallFrame {
  313. /**
  314. * JavaScript function name.
  315. */
  316. functionName: string;
  317. /**
  318. * JavaScript script id.
  319. */
  320. scriptId: ScriptId;
  321. /**
  322. * JavaScript script name or url.
  323. */
  324. url: string;
  325. /**
  326. * JavaScript script line number (0-based).
  327. */
  328. lineNumber: number;
  329. /**
  330. * JavaScript script column number (0-based).
  331. */
  332. columnNumber: number;
  333. }
  334. /**
  335. * Call frames for assertions or error messages.
  336. */
  337. interface StackTrace {
  338. /**
  339. * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
  340. */
  341. description?: string | undefined;
  342. /**
  343. * JavaScript function name.
  344. */
  345. callFrames: CallFrame[];
  346. /**
  347. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  348. */
  349. parent?: StackTrace | undefined;
  350. /**
  351. * Asynchronous JavaScript stack trace that preceded this stack, if available.
  352. * @experimental
  353. */
  354. parentId?: StackTraceId | undefined;
  355. }
  356. /**
  357. * Unique identifier of current debugger.
  358. * @experimental
  359. */
  360. type UniqueDebuggerId = string;
  361. /**
  362. * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
  363. * @experimental
  364. */
  365. interface StackTraceId {
  366. id: string;
  367. debuggerId?: UniqueDebuggerId | undefined;
  368. }
  369. interface EvaluateParameterType {
  370. /**
  371. * Expression to evaluate.
  372. */
  373. expression: string;
  374. /**
  375. * Symbolic group name that can be used to release multiple objects.
  376. */
  377. objectGroup?: string | undefined;
  378. /**
  379. * Determines whether Command Line API should be available during the evaluation.
  380. */
  381. includeCommandLineAPI?: boolean | undefined;
  382. /**
  383. * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
  384. */
  385. silent?: boolean | undefined;
  386. /**
  387. * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
  388. */
  389. contextId?: ExecutionContextId | undefined;
  390. /**
  391. * Whether the result is expected to be a JSON object that should be sent by value.
  392. */
  393. returnByValue?: boolean | undefined;
  394. /**
  395. * Whether preview should be generated for the result.
  396. * @experimental
  397. */
  398. generatePreview?: boolean | undefined;
  399. /**
  400. * Whether execution should be treated as initiated by user in the UI.
  401. */
  402. userGesture?: boolean | undefined;
  403. /**
  404. * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
  405. */
  406. awaitPromise?: boolean | undefined;
  407. }
  408. interface AwaitPromiseParameterType {
  409. /**
  410. * Identifier of the promise.
  411. */
  412. promiseObjectId: RemoteObjectId;
  413. /**
  414. * Whether the result is expected to be a JSON object that should be sent by value.
  415. */
  416. returnByValue?: boolean | undefined;
  417. /**
  418. * Whether preview should be generated for the result.
  419. */
  420. generatePreview?: boolean | undefined;
  421. }
  422. interface CallFunctionOnParameterType {
  423. /**
  424. * Declaration of the function to call.
  425. */
  426. functionDeclaration: string;
  427. /**
  428. * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
  429. */
  430. objectId?: RemoteObjectId | undefined;
  431. /**
  432. * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
  433. */
  434. arguments?: CallArgument[] | undefined;
  435. /**
  436. * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
  437. */
  438. silent?: boolean | undefined;
  439. /**
  440. * Whether the result is expected to be a JSON object which should be sent by value.
  441. */
  442. returnByValue?: boolean | undefined;
  443. /**
  444. * Whether preview should be generated for the result.
  445. * @experimental
  446. */
  447. generatePreview?: boolean | undefined;
  448. /**
  449. * Whether execution should be treated as initiated by user in the UI.
  450. */
  451. userGesture?: boolean | undefined;
  452. /**
  453. * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
  454. */
  455. awaitPromise?: boolean | undefined;
  456. /**
  457. * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
  458. */
  459. executionContextId?: ExecutionContextId | undefined;
  460. /**
  461. * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
  462. */
  463. objectGroup?: string | undefined;
  464. }
  465. interface GetPropertiesParameterType {
  466. /**
  467. * Identifier of the object to return properties for.
  468. */
  469. objectId: RemoteObjectId;
  470. /**
  471. * If true, returns properties belonging only to the element itself, not to its prototype chain.
  472. */
  473. ownProperties?: boolean | undefined;
  474. /**
  475. * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
  476. * @experimental
  477. */
  478. accessorPropertiesOnly?: boolean | undefined;
  479. /**
  480. * Whether preview should be generated for the results.
  481. * @experimental
  482. */
  483. generatePreview?: boolean | undefined;
  484. }
  485. interface ReleaseObjectParameterType {
  486. /**
  487. * Identifier of the object to release.
  488. */
  489. objectId: RemoteObjectId;
  490. }
  491. interface ReleaseObjectGroupParameterType {
  492. /**
  493. * Symbolic object group name.
  494. */
  495. objectGroup: string;
  496. }
  497. interface SetCustomObjectFormatterEnabledParameterType {
  498. enabled: boolean;
  499. }
  500. interface CompileScriptParameterType {
  501. /**
  502. * Expression to compile.
  503. */
  504. expression: string;
  505. /**
  506. * Source url to be set for the script.
  507. */
  508. sourceURL: string;
  509. /**
  510. * Specifies whether the compiled script should be persisted.
  511. */
  512. persistScript: boolean;
  513. /**
  514. * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
  515. */
  516. executionContextId?: ExecutionContextId | undefined;
  517. }
  518. interface RunScriptParameterType {
  519. /**
  520. * Id of the script to run.
  521. */
  522. scriptId: ScriptId;
  523. /**
  524. * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
  525. */
  526. executionContextId?: ExecutionContextId | undefined;
  527. /**
  528. * Symbolic group name that can be used to release multiple objects.
  529. */
  530. objectGroup?: string | undefined;
  531. /**
  532. * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
  533. */
  534. silent?: boolean | undefined;
  535. /**
  536. * Determines whether Command Line API should be available during the evaluation.
  537. */
  538. includeCommandLineAPI?: boolean | undefined;
  539. /**
  540. * Whether the result is expected to be a JSON object which should be sent by value.
  541. */
  542. returnByValue?: boolean | undefined;
  543. /**
  544. * Whether preview should be generated for the result.
  545. */
  546. generatePreview?: boolean | undefined;
  547. /**
  548. * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
  549. */
  550. awaitPromise?: boolean | undefined;
  551. }
  552. interface QueryObjectsParameterType {
  553. /**
  554. * Identifier of the prototype to return objects for.
  555. */
  556. prototypeObjectId: RemoteObjectId;
  557. }
  558. interface GlobalLexicalScopeNamesParameterType {
  559. /**
  560. * Specifies in which execution context to lookup global scope variables.
  561. */
  562. executionContextId?: ExecutionContextId | undefined;
  563. }
  564. interface EvaluateReturnType {
  565. /**
  566. * Evaluation result.
  567. */
  568. result: RemoteObject;
  569. /**
  570. * Exception details.
  571. */
  572. exceptionDetails?: ExceptionDetails | undefined;
  573. }
  574. interface AwaitPromiseReturnType {
  575. /**
  576. * Promise result. Will contain rejected value if promise was rejected.
  577. */
  578. result: RemoteObject;
  579. /**
  580. * Exception details if stack strace is available.
  581. */
  582. exceptionDetails?: ExceptionDetails | undefined;
  583. }
  584. interface CallFunctionOnReturnType {
  585. /**
  586. * Call result.
  587. */
  588. result: RemoteObject;
  589. /**
  590. * Exception details.
  591. */
  592. exceptionDetails?: ExceptionDetails | undefined;
  593. }
  594. interface GetPropertiesReturnType {
  595. /**
  596. * Object properties.
  597. */
  598. result: PropertyDescriptor[];
  599. /**
  600. * Internal object properties (only of the element itself).
  601. */
  602. internalProperties?: InternalPropertyDescriptor[] | undefined;
  603. /**
  604. * Exception details.
  605. */
  606. exceptionDetails?: ExceptionDetails | undefined;
  607. }
  608. interface CompileScriptReturnType {
  609. /**
  610. * Id of the script.
  611. */
  612. scriptId?: ScriptId | undefined;
  613. /**
  614. * Exception details.
  615. */
  616. exceptionDetails?: ExceptionDetails | undefined;
  617. }
  618. interface RunScriptReturnType {
  619. /**
  620. * Run result.
  621. */
  622. result: RemoteObject;
  623. /**
  624. * Exception details.
  625. */
  626. exceptionDetails?: ExceptionDetails | undefined;
  627. }
  628. interface QueryObjectsReturnType {
  629. /**
  630. * Array with objects.
  631. */
  632. objects: RemoteObject;
  633. }
  634. interface GlobalLexicalScopeNamesReturnType {
  635. names: string[];
  636. }
  637. interface ExecutionContextCreatedEventDataType {
  638. /**
  639. * A newly created execution context.
  640. */
  641. context: ExecutionContextDescription;
  642. }
  643. interface ExecutionContextDestroyedEventDataType {
  644. /**
  645. * Id of the destroyed context
  646. */
  647. executionContextId: ExecutionContextId;
  648. }
  649. interface ExceptionThrownEventDataType {
  650. /**
  651. * Timestamp of the exception.
  652. */
  653. timestamp: Timestamp;
  654. exceptionDetails: ExceptionDetails;
  655. }
  656. interface ExceptionRevokedEventDataType {
  657. /**
  658. * Reason describing why exception was revoked.
  659. */
  660. reason: string;
  661. /**
  662. * The id of revoked exception, as reported in <code>exceptionThrown</code>.
  663. */
  664. exceptionId: number;
  665. }
  666. interface ConsoleAPICalledEventDataType {
  667. /**
  668. * Type of the call.
  669. */
  670. type: string;
  671. /**
  672. * Call arguments.
  673. */
  674. args: RemoteObject[];
  675. /**
  676. * Identifier of the context where the call was made.
  677. */
  678. executionContextId: ExecutionContextId;
  679. /**
  680. * Call timestamp.
  681. */
  682. timestamp: Timestamp;
  683. /**
  684. * Stack trace captured when the call was made.
  685. */
  686. stackTrace?: StackTrace | undefined;
  687. /**
  688. * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
  689. * @experimental
  690. */
  691. context?: string | undefined;
  692. }
  693. interface InspectRequestedEventDataType {
  694. object: RemoteObject;
  695. hints: object;
  696. }
  697. }
  698. namespace Debugger {
  699. /**
  700. * Breakpoint identifier.
  701. */
  702. type BreakpointId = string;
  703. /**
  704. * Call frame identifier.
  705. */
  706. type CallFrameId = string;
  707. /**
  708. * Location in the source code.
  709. */
  710. interface Location {
  711. /**
  712. * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
  713. */
  714. scriptId: Runtime.ScriptId;
  715. /**
  716. * Line number in the script (0-based).
  717. */
  718. lineNumber: number;
  719. /**
  720. * Column number in the script (0-based).
  721. */
  722. columnNumber?: number | undefined;
  723. }
  724. /**
  725. * Location in the source code.
  726. * @experimental
  727. */
  728. interface ScriptPosition {
  729. lineNumber: number;
  730. columnNumber: number;
  731. }
  732. /**
  733. * JavaScript call frame. Array of call frames form the call stack.
  734. */
  735. interface CallFrame {
  736. /**
  737. * Call frame identifier. This identifier is only valid while the virtual machine is paused.
  738. */
  739. callFrameId: CallFrameId;
  740. /**
  741. * Name of the JavaScript function called on this call frame.
  742. */
  743. functionName: string;
  744. /**
  745. * Location in the source code.
  746. */
  747. functionLocation?: Location | undefined;
  748. /**
  749. * Location in the source code.
  750. */
  751. location: Location;
  752. /**
  753. * JavaScript script name or url.
  754. */
  755. url: string;
  756. /**
  757. * Scope chain for this call frame.
  758. */
  759. scopeChain: Scope[];
  760. /**
  761. * <code>this</code> object for this call frame.
  762. */
  763. this: Runtime.RemoteObject;
  764. /**
  765. * The value being returned, if the function is at return point.
  766. */
  767. returnValue?: Runtime.RemoteObject | undefined;
  768. }
  769. /**
  770. * Scope description.
  771. */
  772. interface Scope {
  773. /**
  774. * Scope type.
  775. */
  776. type: string;
  777. /**
  778. * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
  779. */
  780. object: Runtime.RemoteObject;
  781. name?: string | undefined;
  782. /**
  783. * Location in the source code where scope starts
  784. */
  785. startLocation?: Location | undefined;
  786. /**
  787. * Location in the source code where scope ends
  788. */
  789. endLocation?: Location | undefined;
  790. }
  791. /**
  792. * Search match for resource.
  793. */
  794. interface SearchMatch {
  795. /**
  796. * Line number in resource content.
  797. */
  798. lineNumber: number;
  799. /**
  800. * Line with match content.
  801. */
  802. lineContent: string;
  803. }
  804. interface BreakLocation {
  805. /**
  806. * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
  807. */
  808. scriptId: Runtime.ScriptId;
  809. /**
  810. * Line number in the script (0-based).
  811. */
  812. lineNumber: number;
  813. /**
  814. * Column number in the script (0-based).
  815. */
  816. columnNumber?: number | undefined;
  817. type?: string | undefined;
  818. }
  819. interface SetBreakpointsActiveParameterType {
  820. /**
  821. * New value for breakpoints active state.
  822. */
  823. active: boolean;
  824. }
  825. interface SetSkipAllPausesParameterType {
  826. /**
  827. * New value for skip pauses state.
  828. */
  829. skip: boolean;
  830. }
  831. interface SetBreakpointByUrlParameterType {
  832. /**
  833. * Line number to set breakpoint at.
  834. */
  835. lineNumber: number;
  836. /**
  837. * URL of the resources to set breakpoint on.
  838. */
  839. url?: string | undefined;
  840. /**
  841. * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
  842. */
  843. urlRegex?: string | undefined;
  844. /**
  845. * Script hash of the resources to set breakpoint on.
  846. */
  847. scriptHash?: string | undefined;
  848. /**
  849. * Offset in the line to set breakpoint at.
  850. */
  851. columnNumber?: number | undefined;
  852. /**
  853. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
  854. */
  855. condition?: string | undefined;
  856. }
  857. interface SetBreakpointParameterType {
  858. /**
  859. * Location to set breakpoint in.
  860. */
  861. location: Location;
  862. /**
  863. * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
  864. */
  865. condition?: string | undefined;
  866. }
  867. interface RemoveBreakpointParameterType {
  868. breakpointId: BreakpointId;
  869. }
  870. interface GetPossibleBreakpointsParameterType {
  871. /**
  872. * Start of range to search possible breakpoint locations in.
  873. */
  874. start: Location;
  875. /**
  876. * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
  877. */
  878. end?: Location | undefined;
  879. /**
  880. * Only consider locations which are in the same (non-nested) function as start.
  881. */
  882. restrictToFunction?: boolean | undefined;
  883. }
  884. interface ContinueToLocationParameterType {
  885. /**
  886. * Location to continue to.
  887. */
  888. location: Location;
  889. targetCallFrames?: string | undefined;
  890. }
  891. interface PauseOnAsyncCallParameterType {
  892. /**
  893. * Debugger will pause when async call with given stack trace is started.
  894. */
  895. parentStackTraceId: Runtime.StackTraceId;
  896. }
  897. interface StepIntoParameterType {
  898. /**
  899. * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
  900. * @experimental
  901. */
  902. breakOnAsyncCall?: boolean | undefined;
  903. }
  904. interface GetStackTraceParameterType {
  905. stackTraceId: Runtime.StackTraceId;
  906. }
  907. interface SearchInContentParameterType {
  908. /**
  909. * Id of the script to search in.
  910. */
  911. scriptId: Runtime.ScriptId;
  912. /**
  913. * String to search for.
  914. */
  915. query: string;
  916. /**
  917. * If true, search is case sensitive.
  918. */
  919. caseSensitive?: boolean | undefined;
  920. /**
  921. * If true, treats string parameter as regex.
  922. */
  923. isRegex?: boolean | undefined;
  924. }
  925. interface SetScriptSourceParameterType {
  926. /**
  927. * Id of the script to edit.
  928. */
  929. scriptId: Runtime.ScriptId;
  930. /**
  931. * New content of the script.
  932. */
  933. scriptSource: string;
  934. /**
  935. * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
  936. */
  937. dryRun?: boolean | undefined;
  938. }
  939. interface RestartFrameParameterType {
  940. /**
  941. * Call frame identifier to evaluate on.
  942. */
  943. callFrameId: CallFrameId;
  944. }
  945. interface GetScriptSourceParameterType {
  946. /**
  947. * Id of the script to get source for.
  948. */
  949. scriptId: Runtime.ScriptId;
  950. }
  951. interface SetPauseOnExceptionsParameterType {
  952. /**
  953. * Pause on exceptions mode.
  954. */
  955. state: string;
  956. }
  957. interface EvaluateOnCallFrameParameterType {
  958. /**
  959. * Call frame identifier to evaluate on.
  960. */
  961. callFrameId: CallFrameId;
  962. /**
  963. * Expression to evaluate.
  964. */
  965. expression: string;
  966. /**
  967. * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
  968. */
  969. objectGroup?: string | undefined;
  970. /**
  971. * Specifies whether command line API should be available to the evaluated expression, defaults to false.
  972. */
  973. includeCommandLineAPI?: boolean | undefined;
  974. /**
  975. * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
  976. */
  977. silent?: boolean | undefined;
  978. /**
  979. * Whether the result is expected to be a JSON object that should be sent by value.
  980. */
  981. returnByValue?: boolean | undefined;
  982. /**
  983. * Whether preview should be generated for the result.
  984. * @experimental
  985. */
  986. generatePreview?: boolean | undefined;
  987. /**
  988. * Whether to throw an exception if side effect cannot be ruled out during evaluation.
  989. */
  990. throwOnSideEffect?: boolean | undefined;
  991. }
  992. interface SetVariableValueParameterType {
  993. /**
  994. * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
  995. */
  996. scopeNumber: number;
  997. /**
  998. * Variable name.
  999. */
  1000. variableName: string;
  1001. /**
  1002. * New variable value.
  1003. */
  1004. newValue: Runtime.CallArgument;
  1005. /**
  1006. * Id of callframe that holds variable.
  1007. */
  1008. callFrameId: CallFrameId;
  1009. }
  1010. interface SetReturnValueParameterType {
  1011. /**
  1012. * New return value.
  1013. */
  1014. newValue: Runtime.CallArgument;
  1015. }
  1016. interface SetAsyncCallStackDepthParameterType {
  1017. /**
  1018. * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
  1019. */
  1020. maxDepth: number;
  1021. }
  1022. interface SetBlackboxPatternsParameterType {
  1023. /**
  1024. * Array of regexps that will be used to check script url for blackbox state.
  1025. */
  1026. patterns: string[];
  1027. }
  1028. interface SetBlackboxedRangesParameterType {
  1029. /**
  1030. * Id of the script.
  1031. */
  1032. scriptId: Runtime.ScriptId;
  1033. positions: ScriptPosition[];
  1034. }
  1035. interface EnableReturnType {
  1036. /**
  1037. * Unique identifier of the debugger.
  1038. * @experimental
  1039. */
  1040. debuggerId: Runtime.UniqueDebuggerId;
  1041. }
  1042. interface SetBreakpointByUrlReturnType {
  1043. /**
  1044. * Id of the created breakpoint for further reference.
  1045. */
  1046. breakpointId: BreakpointId;
  1047. /**
  1048. * List of the locations this breakpoint resolved into upon addition.
  1049. */
  1050. locations: Location[];
  1051. }
  1052. interface SetBreakpointReturnType {
  1053. /**
  1054. * Id of the created breakpoint for further reference.
  1055. */
  1056. breakpointId: BreakpointId;
  1057. /**
  1058. * Location this breakpoint resolved into.
  1059. */
  1060. actualLocation: Location;
  1061. }
  1062. interface GetPossibleBreakpointsReturnType {
  1063. /**
  1064. * List of the possible breakpoint locations.
  1065. */
  1066. locations: BreakLocation[];
  1067. }
  1068. interface GetStackTraceReturnType {
  1069. stackTrace: Runtime.StackTrace;
  1070. }
  1071. interface SearchInContentReturnType {
  1072. /**
  1073. * List of search matches.
  1074. */
  1075. result: SearchMatch[];
  1076. }
  1077. interface SetScriptSourceReturnType {
  1078. /**
  1079. * New stack trace in case editing has happened while VM was stopped.
  1080. */
  1081. callFrames?: CallFrame[] | undefined;
  1082. /**
  1083. * Whether current call stack was modified after applying the changes.
  1084. */
  1085. stackChanged?: boolean | undefined;
  1086. /**
  1087. * Async stack trace, if any.
  1088. */
  1089. asyncStackTrace?: Runtime.StackTrace | undefined;
  1090. /**
  1091. * Async stack trace, if any.
  1092. * @experimental
  1093. */
  1094. asyncStackTraceId?: Runtime.StackTraceId | undefined;
  1095. /**
  1096. * Exception details if any.
  1097. */
  1098. exceptionDetails?: Runtime.ExceptionDetails | undefined;
  1099. }
  1100. interface RestartFrameReturnType {
  1101. /**
  1102. * New stack trace.
  1103. */
  1104. callFrames: CallFrame[];
  1105. /**
  1106. * Async stack trace, if any.
  1107. */
  1108. asyncStackTrace?: Runtime.StackTrace | undefined;
  1109. /**
  1110. * Async stack trace, if any.
  1111. * @experimental
  1112. */
  1113. asyncStackTraceId?: Runtime.StackTraceId | undefined;
  1114. }
  1115. interface GetScriptSourceReturnType {
  1116. /**
  1117. * Script source.
  1118. */
  1119. scriptSource: string;
  1120. }
  1121. interface EvaluateOnCallFrameReturnType {
  1122. /**
  1123. * Object wrapper for the evaluation result.
  1124. */
  1125. result: Runtime.RemoteObject;
  1126. /**
  1127. * Exception details.
  1128. */
  1129. exceptionDetails?: Runtime.ExceptionDetails | undefined;
  1130. }
  1131. interface ScriptParsedEventDataType {
  1132. /**
  1133. * Identifier of the script parsed.
  1134. */
  1135. scriptId: Runtime.ScriptId;
  1136. /**
  1137. * URL or name of the script parsed (if any).
  1138. */
  1139. url: string;
  1140. /**
  1141. * Line offset of the script within the resource with given URL (for script tags).
  1142. */
  1143. startLine: number;
  1144. /**
  1145. * Column offset of the script within the resource with given URL.
  1146. */
  1147. startColumn: number;
  1148. /**
  1149. * Last line of the script.
  1150. */
  1151. endLine: number;
  1152. /**
  1153. * Length of the last line of the script.
  1154. */
  1155. endColumn: number;
  1156. /**
  1157. * Specifies script creation context.
  1158. */
  1159. executionContextId: Runtime.ExecutionContextId;
  1160. /**
  1161. * Content hash of the script.
  1162. */
  1163. hash: string;
  1164. /**
  1165. * Embedder-specific auxiliary data.
  1166. */
  1167. executionContextAuxData?: object | undefined;
  1168. /**
  1169. * True, if this script is generated as a result of the live edit operation.
  1170. * @experimental
  1171. */
  1172. isLiveEdit?: boolean | undefined;
  1173. /**
  1174. * URL of source map associated with script (if any).
  1175. */
  1176. sourceMapURL?: string | undefined;
  1177. /**
  1178. * True, if this script has sourceURL.
  1179. */
  1180. hasSourceURL?: boolean | undefined;
  1181. /**
  1182. * True, if this script is ES6 module.
  1183. */
  1184. isModule?: boolean | undefined;
  1185. /**
  1186. * This script length.
  1187. */
  1188. length?: number | undefined;
  1189. /**
  1190. * JavaScript top stack frame of where the script parsed event was triggered if available.
  1191. * @experimental
  1192. */
  1193. stackTrace?: Runtime.StackTrace | undefined;
  1194. }
  1195. interface ScriptFailedToParseEventDataType {
  1196. /**
  1197. * Identifier of the script parsed.
  1198. */
  1199. scriptId: Runtime.ScriptId;
  1200. /**
  1201. * URL or name of the script parsed (if any).
  1202. */
  1203. url: string;
  1204. /**
  1205. * Line offset of the script within the resource with given URL (for script tags).
  1206. */
  1207. startLine: number;
  1208. /**
  1209. * Column offset of the script within the resource with given URL.
  1210. */
  1211. startColumn: number;
  1212. /**
  1213. * Last line of the script.
  1214. */
  1215. endLine: number;
  1216. /**
  1217. * Length of the last line of the script.
  1218. */
  1219. endColumn: number;
  1220. /**
  1221. * Specifies script creation context.
  1222. */
  1223. executionContextId: Runtime.ExecutionContextId;
  1224. /**
  1225. * Content hash of the script.
  1226. */
  1227. hash: string;
  1228. /**
  1229. * Embedder-specific auxiliary data.
  1230. */
  1231. executionContextAuxData?: object | undefined;
  1232. /**
  1233. * URL of source map associated with script (if any).
  1234. */
  1235. sourceMapURL?: string | undefined;
  1236. /**
  1237. * True, if this script has sourceURL.
  1238. */
  1239. hasSourceURL?: boolean | undefined;
  1240. /**
  1241. * True, if this script is ES6 module.
  1242. */
  1243. isModule?: boolean | undefined;
  1244. /**
  1245. * This script length.
  1246. */
  1247. length?: number | undefined;
  1248. /**
  1249. * JavaScript top stack frame of where the script parsed event was triggered if available.
  1250. * @experimental
  1251. */
  1252. stackTrace?: Runtime.StackTrace | undefined;
  1253. }
  1254. interface BreakpointResolvedEventDataType {
  1255. /**
  1256. * Breakpoint unique identifier.
  1257. */
  1258. breakpointId: BreakpointId;
  1259. /**
  1260. * Actual breakpoint location.
  1261. */
  1262. location: Location;
  1263. }
  1264. interface PausedEventDataType {
  1265. /**
  1266. * Call stack the virtual machine stopped on.
  1267. */
  1268. callFrames: CallFrame[];
  1269. /**
  1270. * Pause reason.
  1271. */
  1272. reason: string;
  1273. /**
  1274. * Object containing break-specific auxiliary properties.
  1275. */
  1276. data?: object | undefined;
  1277. /**
  1278. * Hit breakpoints IDs
  1279. */
  1280. hitBreakpoints?: string[] | undefined;
  1281. /**
  1282. * Async stack trace, if any.
  1283. */
  1284. asyncStackTrace?: Runtime.StackTrace | undefined;
  1285. /**
  1286. * Async stack trace, if any.
  1287. * @experimental
  1288. */
  1289. asyncStackTraceId?: Runtime.StackTraceId | undefined;
  1290. /**
  1291. * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
  1292. * @experimental
  1293. */
  1294. asyncCallStackTraceId?: Runtime.StackTraceId | undefined;
  1295. }
  1296. }
  1297. namespace Console {
  1298. /**
  1299. * Console message.
  1300. */
  1301. interface ConsoleMessage {
  1302. /**
  1303. * Message source.
  1304. */
  1305. source: string;
  1306. /**
  1307. * Message severity.
  1308. */
  1309. level: string;
  1310. /**
  1311. * Message text.
  1312. */
  1313. text: string;
  1314. /**
  1315. * URL of the message origin.
  1316. */
  1317. url?: string | undefined;
  1318. /**
  1319. * Line number in the resource that generated this message (1-based).
  1320. */
  1321. line?: number | undefined;
  1322. /**
  1323. * Column number in the resource that generated this message (1-based).
  1324. */
  1325. column?: number | undefined;
  1326. }
  1327. interface MessageAddedEventDataType {
  1328. /**
  1329. * Console message that has been added.
  1330. */
  1331. message: ConsoleMessage;
  1332. }
  1333. }
  1334. namespace Profiler {
  1335. /**
  1336. * Profile node. Holds callsite information, execution statistics and child nodes.
  1337. */
  1338. interface ProfileNode {
  1339. /**
  1340. * Unique id of the node.
  1341. */
  1342. id: number;
  1343. /**
  1344. * Function location.
  1345. */
  1346. callFrame: Runtime.CallFrame;
  1347. /**
  1348. * Number of samples where this node was on top of the call stack.
  1349. */
  1350. hitCount?: number | undefined;
  1351. /**
  1352. * Child node ids.
  1353. */
  1354. children?: number[] | undefined;
  1355. /**
  1356. * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
  1357. */
  1358. deoptReason?: string | undefined;
  1359. /**
  1360. * An array of source position ticks.
  1361. */
  1362. positionTicks?: PositionTickInfo[] | undefined;
  1363. }
  1364. /**
  1365. * Profile.
  1366. */
  1367. interface Profile {
  1368. /**
  1369. * The list of profile nodes. First item is the root node.
  1370. */
  1371. nodes: ProfileNode[];
  1372. /**
  1373. * Profiling start timestamp in microseconds.
  1374. */
  1375. startTime: number;
  1376. /**
  1377. * Profiling end timestamp in microseconds.
  1378. */
  1379. endTime: number;
  1380. /**
  1381. * Ids of samples top nodes.
  1382. */
  1383. samples?: number[] | undefined;
  1384. /**
  1385. * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
  1386. */
  1387. timeDeltas?: number[] | undefined;
  1388. }
  1389. /**
  1390. * Specifies a number of samples attributed to a certain source position.
  1391. */
  1392. interface PositionTickInfo {
  1393. /**
  1394. * Source line number (1-based).
  1395. */
  1396. line: number;
  1397. /**
  1398. * Number of samples attributed to the source line.
  1399. */
  1400. ticks: number;
  1401. }
  1402. /**
  1403. * Coverage data for a source range.
  1404. */
  1405. interface CoverageRange {
  1406. /**
  1407. * JavaScript script source offset for the range start.
  1408. */
  1409. startOffset: number;
  1410. /**
  1411. * JavaScript script source offset for the range end.
  1412. */
  1413. endOffset: number;
  1414. /**
  1415. * Collected execution count of the source range.
  1416. */
  1417. count: number;
  1418. }
  1419. /**
  1420. * Coverage data for a JavaScript function.
  1421. */
  1422. interface FunctionCoverage {
  1423. /**
  1424. * JavaScript function name.
  1425. */
  1426. functionName: string;
  1427. /**
  1428. * Source ranges inside the function with coverage data.
  1429. */
  1430. ranges: CoverageRange[];
  1431. /**
  1432. * Whether coverage data for this function has block granularity.
  1433. */
  1434. isBlockCoverage: boolean;
  1435. }
  1436. /**
  1437. * Coverage data for a JavaScript script.
  1438. */
  1439. interface ScriptCoverage {
  1440. /**
  1441. * JavaScript script id.
  1442. */
  1443. scriptId: Runtime.ScriptId;
  1444. /**
  1445. * JavaScript script name or url.
  1446. */
  1447. url: string;
  1448. /**
  1449. * Functions contained in the script that has coverage data.
  1450. */
  1451. functions: FunctionCoverage[];
  1452. }
  1453. interface SetSamplingIntervalParameterType {
  1454. /**
  1455. * New sampling interval in microseconds.
  1456. */
  1457. interval: number;
  1458. }
  1459. interface StartPreciseCoverageParameterType {
  1460. /**
  1461. * Collect accurate call counts beyond simple 'covered' or 'not covered'.
  1462. */
  1463. callCount?: boolean | undefined;
  1464. /**
  1465. * Collect block-based coverage.
  1466. */
  1467. detailed?: boolean | undefined;
  1468. }
  1469. interface StopReturnType {
  1470. /**
  1471. * Recorded profile.
  1472. */
  1473. profile: Profile;
  1474. }
  1475. interface TakePreciseCoverageReturnType {
  1476. /**
  1477. * Coverage data for the current isolate.
  1478. */
  1479. result: ScriptCoverage[];
  1480. }
  1481. interface GetBestEffortCoverageReturnType {
  1482. /**
  1483. * Coverage data for the current isolate.
  1484. */
  1485. result: ScriptCoverage[];
  1486. }
  1487. interface ConsoleProfileStartedEventDataType {
  1488. id: string;
  1489. /**
  1490. * Location of console.profile().
  1491. */
  1492. location: Debugger.Location;
  1493. /**
  1494. * Profile title passed as an argument to console.profile().
  1495. */
  1496. title?: string | undefined;
  1497. }
  1498. interface ConsoleProfileFinishedEventDataType {
  1499. id: string;
  1500. /**
  1501. * Location of console.profileEnd().
  1502. */
  1503. location: Debugger.Location;
  1504. profile: Profile;
  1505. /**
  1506. * Profile title passed as an argument to console.profile().
  1507. */
  1508. title?: string | undefined;
  1509. }
  1510. }
  1511. namespace HeapProfiler {
  1512. /**
  1513. * Heap snapshot object id.
  1514. */
  1515. type HeapSnapshotObjectId = string;
  1516. /**
  1517. * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
  1518. */
  1519. interface SamplingHeapProfileNode {
  1520. /**
  1521. * Function location.
  1522. */
  1523. callFrame: Runtime.CallFrame;
  1524. /**
  1525. * Allocations size in bytes for the node excluding children.
  1526. */
  1527. selfSize: number;
  1528. /**
  1529. * Child nodes.
  1530. */
  1531. children: SamplingHeapProfileNode[];
  1532. }
  1533. /**
  1534. * Profile.
  1535. */
  1536. interface SamplingHeapProfile {
  1537. head: SamplingHeapProfileNode;
  1538. }
  1539. interface StartTrackingHeapObjectsParameterType {
  1540. trackAllocations?: boolean | undefined;
  1541. }
  1542. interface StopTrackingHeapObjectsParameterType {
  1543. /**
  1544. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
  1545. */
  1546. reportProgress?: boolean | undefined;
  1547. }
  1548. interface TakeHeapSnapshotParameterType {
  1549. /**
  1550. * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
  1551. */
  1552. reportProgress?: boolean | undefined;
  1553. }
  1554. interface GetObjectByHeapObjectIdParameterType {
  1555. objectId: HeapSnapshotObjectId;
  1556. /**
  1557. * Symbolic group name that can be used to release multiple objects.
  1558. */
  1559. objectGroup?: string | undefined;
  1560. }
  1561. interface AddInspectedHeapObjectParameterType {
  1562. /**
  1563. * Heap snapshot object id to be accessible by means of $x command line API.
  1564. */
  1565. heapObjectId: HeapSnapshotObjectId;
  1566. }
  1567. interface GetHeapObjectIdParameterType {
  1568. /**
  1569. * Identifier of the object to get heap object id for.
  1570. */
  1571. objectId: Runtime.RemoteObjectId;
  1572. }
  1573. interface StartSamplingParameterType {
  1574. /**
  1575. * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
  1576. */
  1577. samplingInterval?: number | undefined;
  1578. }
  1579. interface GetObjectByHeapObjectIdReturnType {
  1580. /**
  1581. * Evaluation result.
  1582. */
  1583. result: Runtime.RemoteObject;
  1584. }
  1585. interface GetHeapObjectIdReturnType {
  1586. /**
  1587. * Id of the heap snapshot object corresponding to the passed remote object id.
  1588. */
  1589. heapSnapshotObjectId: HeapSnapshotObjectId;
  1590. }
  1591. interface StopSamplingReturnType {
  1592. /**
  1593. * Recorded sampling heap profile.
  1594. */
  1595. profile: SamplingHeapProfile;
  1596. }
  1597. interface GetSamplingProfileReturnType {
  1598. /**
  1599. * Return the sampling profile being collected.
  1600. */
  1601. profile: SamplingHeapProfile;
  1602. }
  1603. interface AddHeapSnapshotChunkEventDataType {
  1604. chunk: string;
  1605. }
  1606. interface ReportHeapSnapshotProgressEventDataType {
  1607. done: number;
  1608. total: number;
  1609. finished?: boolean | undefined;
  1610. }
  1611. interface LastSeenObjectIdEventDataType {
  1612. lastSeenObjectId: number;
  1613. timestamp: number;
  1614. }
  1615. interface HeapStatsUpdateEventDataType {
  1616. /**
  1617. * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
  1618. */
  1619. statsUpdate: number[];
  1620. }
  1621. }
  1622. namespace NodeTracing {
  1623. interface TraceConfig {
  1624. /**
  1625. * Controls how the trace buffer stores data.
  1626. */
  1627. recordMode?: string | undefined;
  1628. /**
  1629. * Included category filters.
  1630. */
  1631. includedCategories: string[];
  1632. }
  1633. interface StartParameterType {
  1634. traceConfig: TraceConfig;
  1635. }
  1636. interface GetCategoriesReturnType {
  1637. /**
  1638. * A list of supported tracing categories.
  1639. */
  1640. categories: string[];
  1641. }
  1642. interface DataCollectedEventDataType {
  1643. value: object[];
  1644. }
  1645. }
  1646. namespace NodeWorker {
  1647. type WorkerID = string;
  1648. /**
  1649. * Unique identifier of attached debugging session.
  1650. */
  1651. type SessionID = string;
  1652. interface WorkerInfo {
  1653. workerId: WorkerID;
  1654. type: string;
  1655. title: string;
  1656. url: string;
  1657. }
  1658. interface SendMessageToWorkerParameterType {
  1659. message: string;
  1660. /**
  1661. * Identifier of the session.
  1662. */
  1663. sessionId: SessionID;
  1664. }
  1665. interface EnableParameterType {
  1666. /**
  1667. * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
  1668. * message to run them.
  1669. */
  1670. waitForDebuggerOnStart: boolean;
  1671. }
  1672. interface DetachParameterType {
  1673. sessionId: SessionID;
  1674. }
  1675. interface AttachedToWorkerEventDataType {
  1676. /**
  1677. * Identifier assigned to the session used to send/receive messages.
  1678. */
  1679. sessionId: SessionID;
  1680. workerInfo: WorkerInfo;
  1681. waitingForDebugger: boolean;
  1682. }
  1683. interface DetachedFromWorkerEventDataType {
  1684. /**
  1685. * Detached session identifier.
  1686. */
  1687. sessionId: SessionID;
  1688. }
  1689. interface ReceivedMessageFromWorkerEventDataType {
  1690. /**
  1691. * Identifier of a session which sends a message.
  1692. */
  1693. sessionId: SessionID;
  1694. message: string;
  1695. }
  1696. }
  1697. namespace Network {
  1698. /**
  1699. * Resource type as it was perceived by the rendering engine.
  1700. */
  1701. type ResourceType = string;
  1702. /**
  1703. * Unique request identifier.
  1704. */
  1705. type RequestId = string;
  1706. /**
  1707. * UTC time in seconds, counted from January 1, 1970.
  1708. */
  1709. type TimeSinceEpoch = number;
  1710. /**
  1711. * Monotonically increasing time in seconds since an arbitrary point in the past.
  1712. */
  1713. type MonotonicTime = number;
  1714. /**
  1715. * Information about the request initiator.
  1716. */
  1717. interface Initiator {
  1718. /**
  1719. * Type of this initiator.
  1720. */
  1721. type: string;
  1722. /**
  1723. * Initiator JavaScript stack trace, set for Script only.
  1724. * Requires the Debugger domain to be enabled.
  1725. */
  1726. stack?: Runtime.StackTrace | undefined;
  1727. /**
  1728. * Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
  1729. */
  1730. url?: string | undefined;
  1731. /**
  1732. * Initiator line number, set for Parser type or for Script type (when script is importing
  1733. * module) (0-based).
  1734. */
  1735. lineNumber?: number | undefined;
  1736. /**
  1737. * Initiator column number, set for Parser type or for Script type (when script is importing
  1738. * module) (0-based).
  1739. */
  1740. columnNumber?: number | undefined;
  1741. /**
  1742. * Set if another request triggered this request (e.g. preflight).
  1743. */
  1744. requestId?: RequestId | undefined;
  1745. }
  1746. /**
  1747. * HTTP request data.
  1748. */
  1749. interface Request {
  1750. url: string;
  1751. method: string;
  1752. headers: Headers;
  1753. hasPostData: boolean;
  1754. }
  1755. /**
  1756. * HTTP response data.
  1757. */
  1758. interface Response {
  1759. url: string;
  1760. status: number;
  1761. statusText: string;
  1762. headers: Headers;
  1763. mimeType: string;
  1764. charset: string;
  1765. }
  1766. /**
  1767. * Request / response headers as keys / values of JSON object.
  1768. */
  1769. interface Headers {
  1770. }
  1771. interface LoadNetworkResourcePageResult {
  1772. success: boolean;
  1773. stream?: IO.StreamHandle | undefined;
  1774. }
  1775. interface GetRequestPostDataParameterType {
  1776. /**
  1777. * Identifier of the network request to get content for.
  1778. */
  1779. requestId: RequestId;
  1780. }
  1781. interface GetResponseBodyParameterType {
  1782. /**
  1783. * Identifier of the network request to get content for.
  1784. */
  1785. requestId: RequestId;
  1786. }
  1787. interface StreamResourceContentParameterType {
  1788. /**
  1789. * Identifier of the request to stream.
  1790. */
  1791. requestId: RequestId;
  1792. }
  1793. interface LoadNetworkResourceParameterType {
  1794. /**
  1795. * URL of the resource to get content for.
  1796. */
  1797. url: string;
  1798. }
  1799. interface GetRequestPostDataReturnType {
  1800. /**
  1801. * Request body string, omitting files from multipart requests
  1802. */
  1803. postData: string;
  1804. }
  1805. interface GetResponseBodyReturnType {
  1806. /**
  1807. * Response body.
  1808. */
  1809. body: string;
  1810. /**
  1811. * True, if content was sent as base64.
  1812. */
  1813. base64Encoded: boolean;
  1814. }
  1815. interface StreamResourceContentReturnType {
  1816. /**
  1817. * Data that has been buffered until streaming is enabled.
  1818. */
  1819. bufferedData: string;
  1820. }
  1821. interface LoadNetworkResourceReturnType {
  1822. resource: LoadNetworkResourcePageResult;
  1823. }
  1824. interface RequestWillBeSentEventDataType {
  1825. /**
  1826. * Request identifier.
  1827. */
  1828. requestId: RequestId;
  1829. /**
  1830. * Request data.
  1831. */
  1832. request: Request;
  1833. /**
  1834. * Request initiator.
  1835. */
  1836. initiator: Initiator;
  1837. /**
  1838. * Timestamp.
  1839. */
  1840. timestamp: MonotonicTime;
  1841. /**
  1842. * Timestamp.
  1843. */
  1844. wallTime: TimeSinceEpoch;
  1845. }
  1846. interface ResponseReceivedEventDataType {
  1847. /**
  1848. * Request identifier.
  1849. */
  1850. requestId: RequestId;
  1851. /**
  1852. * Timestamp.
  1853. */
  1854. timestamp: MonotonicTime;
  1855. /**
  1856. * Resource type.
  1857. */
  1858. type: ResourceType;
  1859. /**
  1860. * Response data.
  1861. */
  1862. response: Response;
  1863. }
  1864. interface LoadingFailedEventDataType {
  1865. /**
  1866. * Request identifier.
  1867. */
  1868. requestId: RequestId;
  1869. /**
  1870. * Timestamp.
  1871. */
  1872. timestamp: MonotonicTime;
  1873. /**
  1874. * Resource type.
  1875. */
  1876. type: ResourceType;
  1877. /**
  1878. * Error message.
  1879. */
  1880. errorText: string;
  1881. }
  1882. interface LoadingFinishedEventDataType {
  1883. /**
  1884. * Request identifier.
  1885. */
  1886. requestId: RequestId;
  1887. /**
  1888. * Timestamp.
  1889. */
  1890. timestamp: MonotonicTime;
  1891. }
  1892. interface DataReceivedEventDataType {
  1893. /**
  1894. * Request identifier.
  1895. */
  1896. requestId: RequestId;
  1897. /**
  1898. * Timestamp.
  1899. */
  1900. timestamp: MonotonicTime;
  1901. /**
  1902. * Data chunk length.
  1903. */
  1904. dataLength: number;
  1905. /**
  1906. * Actual bytes received (might be less than dataLength for compressed encodings).
  1907. */
  1908. encodedDataLength: number;
  1909. /**
  1910. * Data that was received.
  1911. * @experimental
  1912. */
  1913. data?: string | undefined;
  1914. }
  1915. }
  1916. namespace NodeRuntime {
  1917. interface NotifyWhenWaitingForDisconnectParameterType {
  1918. enabled: boolean;
  1919. }
  1920. }
  1921. namespace Target {
  1922. type SessionID = string;
  1923. type TargetID = string;
  1924. interface TargetInfo {
  1925. targetId: TargetID;
  1926. type: string;
  1927. title: string;
  1928. url: string;
  1929. attached: boolean;
  1930. canAccessOpener: boolean;
  1931. }
  1932. interface SetAutoAttachParameterType {
  1933. autoAttach: boolean;
  1934. waitForDebuggerOnStart: boolean;
  1935. }
  1936. interface TargetCreatedEventDataType {
  1937. targetInfo: TargetInfo;
  1938. }
  1939. interface AttachedToTargetEventDataType {
  1940. sessionId: SessionID;
  1941. targetInfo: TargetInfo;
  1942. waitingForDebugger: boolean;
  1943. }
  1944. }
  1945. namespace IO {
  1946. type StreamHandle = string;
  1947. interface ReadParameterType {
  1948. /**
  1949. * Handle of the stream to read.
  1950. */
  1951. handle: StreamHandle;
  1952. /**
  1953. * Seek to the specified offset before reading (if not specified, proceed with offset
  1954. * following the last read). Some types of streams may only support sequential reads.
  1955. */
  1956. offset?: number | undefined;
  1957. /**
  1958. * Maximum number of bytes to read (left upon the agent discretion if not specified).
  1959. */
  1960. size?: number | undefined;
  1961. }
  1962. interface CloseParameterType {
  1963. /**
  1964. * Handle of the stream to close.
  1965. */
  1966. handle: StreamHandle;
  1967. }
  1968. interface ReadReturnType {
  1969. /**
  1970. * Data that were read.
  1971. */
  1972. data: string;
  1973. /**
  1974. * Set if the end-of-file condition occurred while reading.
  1975. */
  1976. eof: boolean;
  1977. }
  1978. }
  1979. interface Session {
  1980. /**
  1981. * Posts a message to the inspector back-end. `callback` will be notified when
  1982. * a response is received. `callback` is a function that accepts two optional
  1983. * arguments: error and message-specific result.
  1984. *
  1985. * ```js
  1986. * session.post('Runtime.evaluate', { expression: '2 + 2' },
  1987. * (error, { result }) => console.log(result));
  1988. * // Output: { type: 'number', value: 4, description: '4' }
  1989. * ```
  1990. *
  1991. * The latest version of the V8 inspector protocol is published on the
  1992. * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
  1993. *
  1994. * Node.js inspector supports all the Chrome DevTools Protocol domains declared
  1995. * by V8. Chrome DevTools Protocol domain provides an interface for interacting
  1996. * with one of the runtime agents used to inspect the application state and listen
  1997. * to the run-time events.
  1998. */
  1999. post(method: string, callback?: (err: Error | null, params?: object) => void): void;
  2000. post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void;
  2001. /**
  2002. * Returns supported domains.
  2003. */
  2004. post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
  2005. /**
  2006. * Evaluates expression on global object.
  2007. */
  2008. post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
  2009. post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
  2010. /**
  2011. * Add handler to promise with given promise object id.
  2012. */
  2013. post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
  2014. post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
  2015. /**
  2016. * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
  2017. */
  2018. post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
  2019. post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
  2020. /**
  2021. * Returns properties of a given object. Object group of the result is inherited from the target object.
  2022. */
  2023. post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
  2024. post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
  2025. /**
  2026. * Releases remote object with given id.
  2027. */
  2028. post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
  2029. post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
  2030. /**
  2031. * Releases all remote objects that belong to a given group.
  2032. */
  2033. post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
  2034. post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
  2035. /**
  2036. * Tells inspected instance to run if it was waiting for debugger to attach.
  2037. */
  2038. post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
  2039. /**
  2040. * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
  2041. */
  2042. post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
  2043. /**
  2044. * Disables reporting of execution contexts creation.
  2045. */
  2046. post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
  2047. /**
  2048. * Discards collected exceptions and console API calls.
  2049. */
  2050. post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
  2051. /**
  2052. * @experimental
  2053. */
  2054. post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
  2055. post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
  2056. /**
  2057. * Compiles expression.
  2058. */
  2059. post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
  2060. post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
  2061. /**
  2062. * Runs script with given id in a given context.
  2063. */
  2064. post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
  2065. post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
  2066. post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
  2067. post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
  2068. /**
  2069. * Returns all let, const and class variables from global scope.
  2070. */
  2071. post(
  2072. method: "Runtime.globalLexicalScopeNames",
  2073. params?: Runtime.GlobalLexicalScopeNamesParameterType,
  2074. callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
  2075. ): void;
  2076. post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
  2077. /**
  2078. * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
  2079. */
  2080. post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
  2081. /**
  2082. * Disables debugger for given page.
  2083. */
  2084. post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
  2085. /**
  2086. * Activates / deactivates all breakpoints on the page.
  2087. */
  2088. post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
  2089. post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
  2090. /**
  2091. * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  2092. */
  2093. post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
  2094. post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
  2095. /**
  2096. * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
  2097. */
  2098. post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
  2099. post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
  2100. /**
  2101. * Sets JavaScript breakpoint at a given location.
  2102. */
  2103. post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
  2104. post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
  2105. /**
  2106. * Removes JavaScript breakpoint.
  2107. */
  2108. post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
  2109. post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
  2110. /**
  2111. * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
  2112. */
  2113. post(
  2114. method: "Debugger.getPossibleBreakpoints",
  2115. params?: Debugger.GetPossibleBreakpointsParameterType,
  2116. callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
  2117. ): void;
  2118. post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
  2119. /**
  2120. * Continues execution until specific location is reached.
  2121. */
  2122. post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
  2123. post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
  2124. /**
  2125. * @experimental
  2126. */
  2127. post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
  2128. post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
  2129. /**
  2130. * Steps over the statement.
  2131. */
  2132. post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
  2133. /**
  2134. * Steps into the function call.
  2135. */
  2136. post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
  2137. post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
  2138. /**
  2139. * Steps out of the function call.
  2140. */
  2141. post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
  2142. /**
  2143. * Stops on the next JavaScript statement.
  2144. */
  2145. post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
  2146. /**
  2147. * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
  2148. * @experimental
  2149. */
  2150. post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
  2151. /**
  2152. * Resumes JavaScript execution.
  2153. */
  2154. post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
  2155. /**
  2156. * Returns stack trace with given <code>stackTraceId</code>.
  2157. * @experimental
  2158. */
  2159. post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
  2160. post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
  2161. /**
  2162. * Searches for given string in script content.
  2163. */
  2164. post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
  2165. post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
  2166. /**
  2167. * Edits JavaScript source live.
  2168. */
  2169. post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
  2170. post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
  2171. /**
  2172. * Restarts particular call frame from the beginning.
  2173. */
  2174. post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
  2175. post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
  2176. /**
  2177. * Returns source for the script with given id.
  2178. */
  2179. post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
  2180. post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
  2181. /**
  2182. * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
  2183. */
  2184. post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
  2185. post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
  2186. /**
  2187. * Evaluates expression on a given call frame.
  2188. */
  2189. post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
  2190. post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
  2191. /**
  2192. * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
  2193. */
  2194. post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
  2195. post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
  2196. /**
  2197. * Changes return value in top frame. Available only at return break position.
  2198. * @experimental
  2199. */
  2200. post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
  2201. post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
  2202. /**
  2203. * Enables or disables async call stacks tracking.
  2204. */
  2205. post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
  2206. post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
  2207. /**
  2208. * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  2209. * @experimental
  2210. */
  2211. post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
  2212. post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
  2213. /**
  2214. * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
  2215. * @experimental
  2216. */
  2217. post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
  2218. post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
  2219. /**
  2220. * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
  2221. */
  2222. post(method: "Console.enable", callback?: (err: Error | null) => void): void;
  2223. /**
  2224. * Disables console domain, prevents further console messages from being reported to the client.
  2225. */
  2226. post(method: "Console.disable", callback?: (err: Error | null) => void): void;
  2227. /**
  2228. * Does nothing.
  2229. */
  2230. post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
  2231. post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
  2232. post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
  2233. /**
  2234. * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  2235. */
  2236. post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
  2237. post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
  2238. post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
  2239. post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
  2240. /**
  2241. * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
  2242. */
  2243. post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
  2244. post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
  2245. /**
  2246. * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
  2247. */
  2248. post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
  2249. /**
  2250. * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
  2251. */
  2252. post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
  2253. /**
  2254. * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
  2255. */
  2256. post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
  2257. post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
  2258. post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
  2259. post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
  2260. post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
  2261. post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
  2262. post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
  2263. post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
  2264. post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
  2265. post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
  2266. post(
  2267. method: "HeapProfiler.getObjectByHeapObjectId",
  2268. params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
  2269. callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
  2270. ): void;
  2271. post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
  2272. /**
  2273. * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
  2274. */
  2275. post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
  2276. post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
  2277. post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
  2278. post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
  2279. post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
  2280. post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
  2281. post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
  2282. post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
  2283. /**
  2284. * Gets supported tracing categories.
  2285. */
  2286. post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
  2287. /**
  2288. * Start trace events collection.
  2289. */
  2290. post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
  2291. post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
  2292. /**
  2293. * Stop trace events collection. Remaining collected events will be sent as a sequence of
  2294. * dataCollected events followed by tracingComplete event.
  2295. */
  2296. post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
  2297. /**
  2298. * Sends protocol message over session with given id.
  2299. */
  2300. post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
  2301. post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
  2302. /**
  2303. * Instructs the inspector to attach to running workers. Will also attach to new workers
  2304. * as they start
  2305. */
  2306. post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
  2307. post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
  2308. /**
  2309. * Detaches from all running workers and disables attaching to new workers as they are started.
  2310. */
  2311. post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
  2312. /**
  2313. * Detached from the worker with given sessionId.
  2314. */
  2315. post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
  2316. post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
  2317. /**
  2318. * Disables network tracking, prevents network events from being sent to the client.
  2319. */
  2320. post(method: "Network.disable", callback?: (err: Error | null) => void): void;
  2321. /**
  2322. * Enables network tracking, network events will now be delivered to the client.
  2323. */
  2324. post(method: "Network.enable", callback?: (err: Error | null) => void): void;
  2325. /**
  2326. * Returns post data sent with the request. Returns an error when no data was sent with the request.
  2327. */
  2328. post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType, callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void;
  2329. post(method: "Network.getRequestPostData", callback?: (err: Error | null, params: Network.GetRequestPostDataReturnType) => void): void;
  2330. /**
  2331. * Returns content served for the given request.
  2332. */
  2333. post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType, callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void;
  2334. post(method: "Network.getResponseBody", callback?: (err: Error | null, params: Network.GetResponseBodyReturnType) => void): void;
  2335. /**
  2336. * Enables streaming of the response for the given requestId.
  2337. * If enabled, the dataReceived event contains the data that was received during streaming.
  2338. * @experimental
  2339. */
  2340. post(
  2341. method: "Network.streamResourceContent",
  2342. params?: Network.StreamResourceContentParameterType,
  2343. callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void
  2344. ): void;
  2345. post(method: "Network.streamResourceContent", callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void;
  2346. /**
  2347. * Fetches the resource and returns the content.
  2348. */
  2349. post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType, callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void;
  2350. post(method: "Network.loadNetworkResource", callback?: (err: Error | null, params: Network.LoadNetworkResourceReturnType) => void): void;
  2351. /**
  2352. * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
  2353. */
  2354. post(method: "NodeRuntime.enable", callback?: (err: Error | null) => void): void;
  2355. /**
  2356. * Disable NodeRuntime events
  2357. */
  2358. post(method: "NodeRuntime.disable", callback?: (err: Error | null) => void): void;
  2359. /**
  2360. * Enable the `NodeRuntime.waitingForDisconnect`.
  2361. */
  2362. post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
  2363. post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void;
  2364. post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void;
  2365. post(method: "Target.setAutoAttach", callback?: (err: Error | null) => void): void;
  2366. /**
  2367. * Read a chunk of the stream
  2368. */
  2369. post(method: "IO.read", params?: IO.ReadParameterType, callback?: (err: Error | null, params: IO.ReadReturnType) => void): void;
  2370. post(method: "IO.read", callback?: (err: Error | null, params: IO.ReadReturnType) => void): void;
  2371. post(method: "IO.close", params?: IO.CloseParameterType, callback?: (err: Error | null) => void): void;
  2372. post(method: "IO.close", callback?: (err: Error | null) => void): void;
  2373. addListener(event: string, listener: (...args: any[]) => void): this;
  2374. /**
  2375. * Emitted when any notification from the V8 Inspector is received.
  2376. */
  2377. addListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  2378. /**
  2379. * Issued when new execution context is created.
  2380. */
  2381. addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2382. /**
  2383. * Issued when execution context is destroyed.
  2384. */
  2385. addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2386. /**
  2387. * Issued when all executionContexts were cleared in browser
  2388. */
  2389. addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2390. /**
  2391. * Issued when exception was thrown and unhandled.
  2392. */
  2393. addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2394. /**
  2395. * Issued when unhandled exception was revoked.
  2396. */
  2397. addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2398. /**
  2399. * Issued when console API was called.
  2400. */
  2401. addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2402. /**
  2403. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  2404. */
  2405. addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2406. /**
  2407. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  2408. */
  2409. addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2410. /**
  2411. * Fired when virtual machine fails to parse the script.
  2412. */
  2413. addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2414. /**
  2415. * Fired when breakpoint is resolved to an actual script and location.
  2416. */
  2417. addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2418. /**
  2419. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2420. */
  2421. addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2422. /**
  2423. * Fired when the virtual machine resumed execution.
  2424. */
  2425. addListener(event: "Debugger.resumed", listener: () => void): this;
  2426. /**
  2427. * Issued when new console message is added.
  2428. */
  2429. addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2430. /**
  2431. * Sent when new profile recording is started using console.profile() call.
  2432. */
  2433. addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2434. addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2435. addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2436. addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2437. addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2438. /**
  2439. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2440. */
  2441. addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2442. /**
  2443. * If heap objects tracking has been started then backend may send update for one or more fragments
  2444. */
  2445. addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2446. /**
  2447. * Contains an bucket of collected trace events.
  2448. */
  2449. addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2450. /**
  2451. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2452. * delivered via dataCollected events.
  2453. */
  2454. addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2455. /**
  2456. * Issued when attached to a worker.
  2457. */
  2458. addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2459. /**
  2460. * Issued when detached from the worker.
  2461. */
  2462. addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2463. /**
  2464. * Notifies about a new protocol message received from the session
  2465. * (session ID is provided in attachedToWorker notification).
  2466. */
  2467. addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2468. /**
  2469. * Fired when page is about to send HTTP request.
  2470. */
  2471. addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  2472. /**
  2473. * Fired when HTTP response is available.
  2474. */
  2475. addListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  2476. addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  2477. addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  2478. /**
  2479. * Fired when data chunk was received over the network.
  2480. */
  2481. addListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  2482. /**
  2483. * This event is fired instead of `Runtime.executionContextDestroyed` when
  2484. * enabled.
  2485. * It is fired when the Node process finished all code execution and is
  2486. * waiting for all frontends to disconnect.
  2487. */
  2488. addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  2489. /**
  2490. * This event is fired when the runtime is waiting for the debugger. For
  2491. * example, when inspector.waitingForDebugger is called
  2492. */
  2493. addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  2494. addListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  2495. addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  2496. emit(event: string | symbol, ...args: any[]): boolean;
  2497. emit(event: "inspectorNotification", message: InspectorNotification<object>): boolean;
  2498. emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
  2499. emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
  2500. emit(event: "Runtime.executionContextsCleared"): boolean;
  2501. emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
  2502. emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
  2503. emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
  2504. emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
  2505. emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
  2506. emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
  2507. emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
  2508. emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
  2509. emit(event: "Debugger.resumed"): boolean;
  2510. emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
  2511. emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
  2512. emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
  2513. emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
  2514. emit(event: "HeapProfiler.resetProfiles"): boolean;
  2515. emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
  2516. emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
  2517. emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
  2518. emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
  2519. emit(event: "NodeTracing.tracingComplete"): boolean;
  2520. emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
  2521. emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
  2522. emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
  2523. emit(event: "Network.requestWillBeSent", message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
  2524. emit(event: "Network.responseReceived", message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
  2525. emit(event: "Network.loadingFailed", message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
  2526. emit(event: "Network.loadingFinished", message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
  2527. emit(event: "Network.dataReceived", message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
  2528. emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
  2529. emit(event: "NodeRuntime.waitingForDebugger"): boolean;
  2530. emit(event: "Target.targetCreated", message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
  2531. emit(event: "Target.attachedToTarget", message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
  2532. on(event: string, listener: (...args: any[]) => void): this;
  2533. /**
  2534. * Emitted when any notification from the V8 Inspector is received.
  2535. */
  2536. on(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  2537. /**
  2538. * Issued when new execution context is created.
  2539. */
  2540. on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2541. /**
  2542. * Issued when execution context is destroyed.
  2543. */
  2544. on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2545. /**
  2546. * Issued when all executionContexts were cleared in browser
  2547. */
  2548. on(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2549. /**
  2550. * Issued when exception was thrown and unhandled.
  2551. */
  2552. on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2553. /**
  2554. * Issued when unhandled exception was revoked.
  2555. */
  2556. on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2557. /**
  2558. * Issued when console API was called.
  2559. */
  2560. on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2561. /**
  2562. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  2563. */
  2564. on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2565. /**
  2566. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  2567. */
  2568. on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2569. /**
  2570. * Fired when virtual machine fails to parse the script.
  2571. */
  2572. on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2573. /**
  2574. * Fired when breakpoint is resolved to an actual script and location.
  2575. */
  2576. on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2577. /**
  2578. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2579. */
  2580. on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2581. /**
  2582. * Fired when the virtual machine resumed execution.
  2583. */
  2584. on(event: "Debugger.resumed", listener: () => void): this;
  2585. /**
  2586. * Issued when new console message is added.
  2587. */
  2588. on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2589. /**
  2590. * Sent when new profile recording is started using console.profile() call.
  2591. */
  2592. on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2593. on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2594. on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2595. on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2596. on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2597. /**
  2598. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2599. */
  2600. on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2601. /**
  2602. * If heap objects tracking has been started then backend may send update for one or more fragments
  2603. */
  2604. on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2605. /**
  2606. * Contains an bucket of collected trace events.
  2607. */
  2608. on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2609. /**
  2610. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2611. * delivered via dataCollected events.
  2612. */
  2613. on(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2614. /**
  2615. * Issued when attached to a worker.
  2616. */
  2617. on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2618. /**
  2619. * Issued when detached from the worker.
  2620. */
  2621. on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2622. /**
  2623. * Notifies about a new protocol message received from the session
  2624. * (session ID is provided in attachedToWorker notification).
  2625. */
  2626. on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2627. /**
  2628. * Fired when page is about to send HTTP request.
  2629. */
  2630. on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  2631. /**
  2632. * Fired when HTTP response is available.
  2633. */
  2634. on(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  2635. on(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  2636. on(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  2637. /**
  2638. * Fired when data chunk was received over the network.
  2639. */
  2640. on(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  2641. /**
  2642. * This event is fired instead of `Runtime.executionContextDestroyed` when
  2643. * enabled.
  2644. * It is fired when the Node process finished all code execution and is
  2645. * waiting for all frontends to disconnect.
  2646. */
  2647. on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  2648. /**
  2649. * This event is fired when the runtime is waiting for the debugger. For
  2650. * example, when inspector.waitingForDebugger is called
  2651. */
  2652. on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  2653. on(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  2654. on(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  2655. once(event: string, listener: (...args: any[]) => void): this;
  2656. /**
  2657. * Emitted when any notification from the V8 Inspector is received.
  2658. */
  2659. once(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  2660. /**
  2661. * Issued when new execution context is created.
  2662. */
  2663. once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2664. /**
  2665. * Issued when execution context is destroyed.
  2666. */
  2667. once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2668. /**
  2669. * Issued when all executionContexts were cleared in browser
  2670. */
  2671. once(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2672. /**
  2673. * Issued when exception was thrown and unhandled.
  2674. */
  2675. once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2676. /**
  2677. * Issued when unhandled exception was revoked.
  2678. */
  2679. once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2680. /**
  2681. * Issued when console API was called.
  2682. */
  2683. once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2684. /**
  2685. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  2686. */
  2687. once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2688. /**
  2689. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  2690. */
  2691. once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2692. /**
  2693. * Fired when virtual machine fails to parse the script.
  2694. */
  2695. once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2696. /**
  2697. * Fired when breakpoint is resolved to an actual script and location.
  2698. */
  2699. once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2700. /**
  2701. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2702. */
  2703. once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2704. /**
  2705. * Fired when the virtual machine resumed execution.
  2706. */
  2707. once(event: "Debugger.resumed", listener: () => void): this;
  2708. /**
  2709. * Issued when new console message is added.
  2710. */
  2711. once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2712. /**
  2713. * Sent when new profile recording is started using console.profile() call.
  2714. */
  2715. once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2716. once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2717. once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2718. once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2719. once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2720. /**
  2721. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2722. */
  2723. once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2724. /**
  2725. * If heap objects tracking has been started then backend may send update for one or more fragments
  2726. */
  2727. once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2728. /**
  2729. * Contains an bucket of collected trace events.
  2730. */
  2731. once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2732. /**
  2733. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2734. * delivered via dataCollected events.
  2735. */
  2736. once(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2737. /**
  2738. * Issued when attached to a worker.
  2739. */
  2740. once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2741. /**
  2742. * Issued when detached from the worker.
  2743. */
  2744. once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2745. /**
  2746. * Notifies about a new protocol message received from the session
  2747. * (session ID is provided in attachedToWorker notification).
  2748. */
  2749. once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2750. /**
  2751. * Fired when page is about to send HTTP request.
  2752. */
  2753. once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  2754. /**
  2755. * Fired when HTTP response is available.
  2756. */
  2757. once(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  2758. once(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  2759. once(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  2760. /**
  2761. * Fired when data chunk was received over the network.
  2762. */
  2763. once(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  2764. /**
  2765. * This event is fired instead of `Runtime.executionContextDestroyed` when
  2766. * enabled.
  2767. * It is fired when the Node process finished all code execution and is
  2768. * waiting for all frontends to disconnect.
  2769. */
  2770. once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  2771. /**
  2772. * This event is fired when the runtime is waiting for the debugger. For
  2773. * example, when inspector.waitingForDebugger is called
  2774. */
  2775. once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  2776. once(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  2777. once(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  2778. prependListener(event: string, listener: (...args: any[]) => void): this;
  2779. /**
  2780. * Emitted when any notification from the V8 Inspector is received.
  2781. */
  2782. prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  2783. /**
  2784. * Issued when new execution context is created.
  2785. */
  2786. prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2787. /**
  2788. * Issued when execution context is destroyed.
  2789. */
  2790. prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2791. /**
  2792. * Issued when all executionContexts were cleared in browser
  2793. */
  2794. prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2795. /**
  2796. * Issued when exception was thrown and unhandled.
  2797. */
  2798. prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2799. /**
  2800. * Issued when unhandled exception was revoked.
  2801. */
  2802. prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2803. /**
  2804. * Issued when console API was called.
  2805. */
  2806. prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2807. /**
  2808. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  2809. */
  2810. prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2811. /**
  2812. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  2813. */
  2814. prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2815. /**
  2816. * Fired when virtual machine fails to parse the script.
  2817. */
  2818. prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2819. /**
  2820. * Fired when breakpoint is resolved to an actual script and location.
  2821. */
  2822. prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2823. /**
  2824. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2825. */
  2826. prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2827. /**
  2828. * Fired when the virtual machine resumed execution.
  2829. */
  2830. prependListener(event: "Debugger.resumed", listener: () => void): this;
  2831. /**
  2832. * Issued when new console message is added.
  2833. */
  2834. prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2835. /**
  2836. * Sent when new profile recording is started using console.profile() call.
  2837. */
  2838. prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2839. prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2840. prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2841. prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2842. prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2843. /**
  2844. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2845. */
  2846. prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2847. /**
  2848. * If heap objects tracking has been started then backend may send update for one or more fragments
  2849. */
  2850. prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2851. /**
  2852. * Contains an bucket of collected trace events.
  2853. */
  2854. prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2855. /**
  2856. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2857. * delivered via dataCollected events.
  2858. */
  2859. prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2860. /**
  2861. * Issued when attached to a worker.
  2862. */
  2863. prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2864. /**
  2865. * Issued when detached from the worker.
  2866. */
  2867. prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2868. /**
  2869. * Notifies about a new protocol message received from the session
  2870. * (session ID is provided in attachedToWorker notification).
  2871. */
  2872. prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2873. /**
  2874. * Fired when page is about to send HTTP request.
  2875. */
  2876. prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  2877. /**
  2878. * Fired when HTTP response is available.
  2879. */
  2880. prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  2881. prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  2882. prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  2883. /**
  2884. * Fired when data chunk was received over the network.
  2885. */
  2886. prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  2887. /**
  2888. * This event is fired instead of `Runtime.executionContextDestroyed` when
  2889. * enabled.
  2890. * It is fired when the Node process finished all code execution and is
  2891. * waiting for all frontends to disconnect.
  2892. */
  2893. prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  2894. /**
  2895. * This event is fired when the runtime is waiting for the debugger. For
  2896. * example, when inspector.waitingForDebugger is called
  2897. */
  2898. prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  2899. prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  2900. prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  2901. prependOnceListener(event: string, listener: (...args: any[]) => void): this;
  2902. /**
  2903. * Emitted when any notification from the V8 Inspector is received.
  2904. */
  2905. prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  2906. /**
  2907. * Issued when new execution context is created.
  2908. */
  2909. prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  2910. /**
  2911. * Issued when execution context is destroyed.
  2912. */
  2913. prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  2914. /**
  2915. * Issued when all executionContexts were cleared in browser
  2916. */
  2917. prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  2918. /**
  2919. * Issued when exception was thrown and unhandled.
  2920. */
  2921. prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  2922. /**
  2923. * Issued when unhandled exception was revoked.
  2924. */
  2925. prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  2926. /**
  2927. * Issued when console API was called.
  2928. */
  2929. prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  2930. /**
  2931. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  2932. */
  2933. prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  2934. /**
  2935. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  2936. */
  2937. prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  2938. /**
  2939. * Fired when virtual machine fails to parse the script.
  2940. */
  2941. prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  2942. /**
  2943. * Fired when breakpoint is resolved to an actual script and location.
  2944. */
  2945. prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  2946. /**
  2947. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  2948. */
  2949. prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  2950. /**
  2951. * Fired when the virtual machine resumed execution.
  2952. */
  2953. prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
  2954. /**
  2955. * Issued when new console message is added.
  2956. */
  2957. prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  2958. /**
  2959. * Sent when new profile recording is started using console.profile() call.
  2960. */
  2961. prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  2962. prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  2963. prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  2964. prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  2965. prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  2966. /**
  2967. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  2968. */
  2969. prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  2970. /**
  2971. * If heap objects tracking has been started then backend may send update for one or more fragments
  2972. */
  2973. prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  2974. /**
  2975. * Contains an bucket of collected trace events.
  2976. */
  2977. prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  2978. /**
  2979. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  2980. * delivered via dataCollected events.
  2981. */
  2982. prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  2983. /**
  2984. * Issued when attached to a worker.
  2985. */
  2986. prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  2987. /**
  2988. * Issued when detached from the worker.
  2989. */
  2990. prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  2991. /**
  2992. * Notifies about a new protocol message received from the session
  2993. * (session ID is provided in attachedToWorker notification).
  2994. */
  2995. prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  2996. /**
  2997. * Fired when page is about to send HTTP request.
  2998. */
  2999. prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  3000. /**
  3001. * Fired when HTTP response is available.
  3002. */
  3003. prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  3004. prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  3005. prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  3006. /**
  3007. * Fired when data chunk was received over the network.
  3008. */
  3009. prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  3010. /**
  3011. * This event is fired instead of `Runtime.executionContextDestroyed` when
  3012. * enabled.
  3013. * It is fired when the Node process finished all code execution and is
  3014. * waiting for all frontends to disconnect.
  3015. */
  3016. prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  3017. /**
  3018. * This event is fired when the runtime is waiting for the debugger. For
  3019. * example, when inspector.waitingForDebugger is called
  3020. */
  3021. prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  3022. prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  3023. prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  3024. }
  3025. }
  3026. declare module "inspector/promises" {
  3027. export {
  3028. Schema,
  3029. Runtime,
  3030. Debugger,
  3031. Console,
  3032. Profiler,
  3033. HeapProfiler,
  3034. NodeTracing,
  3035. NodeWorker,
  3036. Network,
  3037. NodeRuntime,
  3038. Target,
  3039. IO,
  3040. } from 'inspector';
  3041. }
  3042. declare module "inspector/promises" {
  3043. import {
  3044. InspectorNotification,
  3045. Schema,
  3046. Runtime,
  3047. Debugger,
  3048. Console,
  3049. Profiler,
  3050. HeapProfiler,
  3051. NodeTracing,
  3052. NodeWorker,
  3053. Network,
  3054. NodeRuntime,
  3055. Target,
  3056. IO,
  3057. } from "inspector";
  3058. /**
  3059. * The `inspector.Session` is used for dispatching messages to the V8 inspector
  3060. * back-end and receiving message responses and notifications.
  3061. * @since v19.0.0
  3062. */
  3063. interface Session {
  3064. /**
  3065. * Posts a message to the inspector back-end.
  3066. *
  3067. * ```js
  3068. * import { Session } from 'node:inspector/promises';
  3069. * try {
  3070. * const session = new Session();
  3071. * session.connect();
  3072. * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' });
  3073. * console.log(result);
  3074. * } catch (error) {
  3075. * console.error(error);
  3076. * }
  3077. * // Output: { result: { type: 'number', value: 4, description: '4' } }
  3078. * ```
  3079. *
  3080. * The latest version of the V8 inspector protocol is published on the
  3081. * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
  3082. *
  3083. * Node.js inspector supports all the Chrome DevTools Protocol domains declared
  3084. * by V8. Chrome DevTools Protocol domain provides an interface for interacting
  3085. * with one of the runtime agents used to inspect the application state and listen
  3086. * to the run-time events.
  3087. */
  3088. post(method: string, params?: object): Promise<void>;
  3089. /**
  3090. * Returns supported domains.
  3091. */
  3092. post(method: "Schema.getDomains"): Promise<Schema.GetDomainsReturnType>;
  3093. /**
  3094. * Evaluates expression on global object.
  3095. */
  3096. post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType): Promise<Runtime.EvaluateReturnType>;
  3097. /**
  3098. * Add handler to promise with given promise object id.
  3099. */
  3100. post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType): Promise<Runtime.AwaitPromiseReturnType>;
  3101. /**
  3102. * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
  3103. */
  3104. post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType): Promise<Runtime.CallFunctionOnReturnType>;
  3105. /**
  3106. * Returns properties of a given object. Object group of the result is inherited from the target object.
  3107. */
  3108. post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType): Promise<Runtime.GetPropertiesReturnType>;
  3109. /**
  3110. * Releases remote object with given id.
  3111. */
  3112. post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType): Promise<void>;
  3113. /**
  3114. * Releases all remote objects that belong to a given group.
  3115. */
  3116. post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType): Promise<void>;
  3117. /**
  3118. * Tells inspected instance to run if it was waiting for debugger to attach.
  3119. */
  3120. post(method: "Runtime.runIfWaitingForDebugger"): Promise<void>;
  3121. /**
  3122. * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
  3123. */
  3124. post(method: "Runtime.enable"): Promise<void>;
  3125. /**
  3126. * Disables reporting of execution contexts creation.
  3127. */
  3128. post(method: "Runtime.disable"): Promise<void>;
  3129. /**
  3130. * Discards collected exceptions and console API calls.
  3131. */
  3132. post(method: "Runtime.discardConsoleEntries"): Promise<void>;
  3133. /**
  3134. * @experimental
  3135. */
  3136. post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise<void>;
  3137. /**
  3138. * Compiles expression.
  3139. */
  3140. post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType): Promise<Runtime.CompileScriptReturnType>;
  3141. /**
  3142. * Runs script with given id in a given context.
  3143. */
  3144. post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType): Promise<Runtime.RunScriptReturnType>;
  3145. post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType): Promise<Runtime.QueryObjectsReturnType>;
  3146. /**
  3147. * Returns all let, const and class variables from global scope.
  3148. */
  3149. post(method: "Runtime.globalLexicalScopeNames", params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise<Runtime.GlobalLexicalScopeNamesReturnType>;
  3150. /**
  3151. * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
  3152. */
  3153. post(method: "Debugger.enable"): Promise<Debugger.EnableReturnType>;
  3154. /**
  3155. * Disables debugger for given page.
  3156. */
  3157. post(method: "Debugger.disable"): Promise<void>;
  3158. /**
  3159. * Activates / deactivates all breakpoints on the page.
  3160. */
  3161. post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType): Promise<void>;
  3162. /**
  3163. * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
  3164. */
  3165. post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType): Promise<void>;
  3166. /**
  3167. * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
  3168. */
  3169. post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType): Promise<Debugger.SetBreakpointByUrlReturnType>;
  3170. /**
  3171. * Sets JavaScript breakpoint at a given location.
  3172. */
  3173. post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType): Promise<Debugger.SetBreakpointReturnType>;
  3174. /**
  3175. * Removes JavaScript breakpoint.
  3176. */
  3177. post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType): Promise<void>;
  3178. /**
  3179. * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
  3180. */
  3181. post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType): Promise<Debugger.GetPossibleBreakpointsReturnType>;
  3182. /**
  3183. * Continues execution until specific location is reached.
  3184. */
  3185. post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType): Promise<void>;
  3186. /**
  3187. * @experimental
  3188. */
  3189. post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType): Promise<void>;
  3190. /**
  3191. * Steps over the statement.
  3192. */
  3193. post(method: "Debugger.stepOver"): Promise<void>;
  3194. /**
  3195. * Steps into the function call.
  3196. */
  3197. post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType): Promise<void>;
  3198. /**
  3199. * Steps out of the function call.
  3200. */
  3201. post(method: "Debugger.stepOut"): Promise<void>;
  3202. /**
  3203. * Stops on the next JavaScript statement.
  3204. */
  3205. post(method: "Debugger.pause"): Promise<void>;
  3206. /**
  3207. * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
  3208. * @experimental
  3209. */
  3210. post(method: "Debugger.scheduleStepIntoAsync"): Promise<void>;
  3211. /**
  3212. * Resumes JavaScript execution.
  3213. */
  3214. post(method: "Debugger.resume"): Promise<void>;
  3215. /**
  3216. * Returns stack trace with given <code>stackTraceId</code>.
  3217. * @experimental
  3218. */
  3219. post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType): Promise<Debugger.GetStackTraceReturnType>;
  3220. /**
  3221. * Searches for given string in script content.
  3222. */
  3223. post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType): Promise<Debugger.SearchInContentReturnType>;
  3224. /**
  3225. * Edits JavaScript source live.
  3226. */
  3227. post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType): Promise<Debugger.SetScriptSourceReturnType>;
  3228. /**
  3229. * Restarts particular call frame from the beginning.
  3230. */
  3231. post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType): Promise<Debugger.RestartFrameReturnType>;
  3232. /**
  3233. * Returns source for the script with given id.
  3234. */
  3235. post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType): Promise<Debugger.GetScriptSourceReturnType>;
  3236. /**
  3237. * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
  3238. */
  3239. post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType): Promise<void>;
  3240. /**
  3241. * Evaluates expression on a given call frame.
  3242. */
  3243. post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType): Promise<Debugger.EvaluateOnCallFrameReturnType>;
  3244. /**
  3245. * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
  3246. */
  3247. post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType): Promise<void>;
  3248. /**
  3249. * Changes return value in top frame. Available only at return break position.
  3250. * @experimental
  3251. */
  3252. post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType): Promise<void>;
  3253. /**
  3254. * Enables or disables async call stacks tracking.
  3255. */
  3256. post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType): Promise<void>;
  3257. /**
  3258. * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
  3259. * @experimental
  3260. */
  3261. post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType): Promise<void>;
  3262. /**
  3263. * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
  3264. * @experimental
  3265. */
  3266. post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType): Promise<void>;
  3267. /**
  3268. * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
  3269. */
  3270. post(method: "Console.enable"): Promise<void>;
  3271. /**
  3272. * Disables console domain, prevents further console messages from being reported to the client.
  3273. */
  3274. post(method: "Console.disable"): Promise<void>;
  3275. /**
  3276. * Does nothing.
  3277. */
  3278. post(method: "Console.clearMessages"): Promise<void>;
  3279. post(method: "Profiler.enable"): Promise<void>;
  3280. post(method: "Profiler.disable"): Promise<void>;
  3281. /**
  3282. * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
  3283. */
  3284. post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType): Promise<void>;
  3285. post(method: "Profiler.start"): Promise<void>;
  3286. post(method: "Profiler.stop"): Promise<Profiler.StopReturnType>;
  3287. /**
  3288. * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
  3289. */
  3290. post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType): Promise<void>;
  3291. /**
  3292. * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
  3293. */
  3294. post(method: "Profiler.stopPreciseCoverage"): Promise<void>;
  3295. /**
  3296. * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
  3297. */
  3298. post(method: "Profiler.takePreciseCoverage"): Promise<Profiler.TakePreciseCoverageReturnType>;
  3299. /**
  3300. * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
  3301. */
  3302. post(method: "Profiler.getBestEffortCoverage"): Promise<Profiler.GetBestEffortCoverageReturnType>;
  3303. post(method: "HeapProfiler.enable"): Promise<void>;
  3304. post(method: "HeapProfiler.disable"): Promise<void>;
  3305. post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise<void>;
  3306. post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise<void>;
  3307. post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise<void>;
  3308. post(method: "HeapProfiler.collectGarbage"): Promise<void>;
  3309. post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise<HeapProfiler.GetObjectByHeapObjectIdReturnType>;
  3310. /**
  3311. * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
  3312. */
  3313. post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise<void>;
  3314. post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType): Promise<HeapProfiler.GetHeapObjectIdReturnType>;
  3315. post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType): Promise<void>;
  3316. post(method: "HeapProfiler.stopSampling"): Promise<HeapProfiler.StopSamplingReturnType>;
  3317. post(method: "HeapProfiler.getSamplingProfile"): Promise<HeapProfiler.GetSamplingProfileReturnType>;
  3318. /**
  3319. * Gets supported tracing categories.
  3320. */
  3321. post(method: "NodeTracing.getCategories"): Promise<NodeTracing.GetCategoriesReturnType>;
  3322. /**
  3323. * Start trace events collection.
  3324. */
  3325. post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType): Promise<void>;
  3326. /**
  3327. * Stop trace events collection. Remaining collected events will be sent as a sequence of
  3328. * dataCollected events followed by tracingComplete event.
  3329. */
  3330. post(method: "NodeTracing.stop"): Promise<void>;
  3331. /**
  3332. * Sends protocol message over session with given id.
  3333. */
  3334. post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType): Promise<void>;
  3335. /**
  3336. * Instructs the inspector to attach to running workers. Will also attach to new workers
  3337. * as they start
  3338. */
  3339. post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType): Promise<void>;
  3340. /**
  3341. * Detaches from all running workers and disables attaching to new workers as they are started.
  3342. */
  3343. post(method: "NodeWorker.disable"): Promise<void>;
  3344. /**
  3345. * Detached from the worker with given sessionId.
  3346. */
  3347. post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType): Promise<void>;
  3348. /**
  3349. * Disables network tracking, prevents network events from being sent to the client.
  3350. */
  3351. post(method: "Network.disable"): Promise<void>;
  3352. /**
  3353. * Enables network tracking, network events will now be delivered to the client.
  3354. */
  3355. post(method: "Network.enable"): Promise<void>;
  3356. /**
  3357. * Returns post data sent with the request. Returns an error when no data was sent with the request.
  3358. */
  3359. post(method: "Network.getRequestPostData", params?: Network.GetRequestPostDataParameterType): Promise<Network.GetRequestPostDataReturnType>;
  3360. /**
  3361. * Returns content served for the given request.
  3362. */
  3363. post(method: "Network.getResponseBody", params?: Network.GetResponseBodyParameterType): Promise<Network.GetResponseBodyReturnType>;
  3364. /**
  3365. * Enables streaming of the response for the given requestId.
  3366. * If enabled, the dataReceived event contains the data that was received during streaming.
  3367. * @experimental
  3368. */
  3369. post(method: "Network.streamResourceContent", params?: Network.StreamResourceContentParameterType): Promise<Network.StreamResourceContentReturnType>;
  3370. /**
  3371. * Fetches the resource and returns the content.
  3372. */
  3373. post(method: "Network.loadNetworkResource", params?: Network.LoadNetworkResourceParameterType): Promise<Network.LoadNetworkResourceReturnType>;
  3374. /**
  3375. * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
  3376. */
  3377. post(method: "NodeRuntime.enable"): Promise<void>;
  3378. /**
  3379. * Disable NodeRuntime events
  3380. */
  3381. post(method: "NodeRuntime.disable"): Promise<void>;
  3382. /**
  3383. * Enable the `NodeRuntime.waitingForDisconnect`.
  3384. */
  3385. post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
  3386. post(method: "Target.setAutoAttach", params?: Target.SetAutoAttachParameterType): Promise<void>;
  3387. /**
  3388. * Read a chunk of the stream
  3389. */
  3390. post(method: "IO.read", params?: IO.ReadParameterType): Promise<IO.ReadReturnType>;
  3391. post(method: "IO.close", params?: IO.CloseParameterType): Promise<void>;
  3392. addListener(event: string, listener: (...args: any[]) => void): this;
  3393. /**
  3394. * Emitted when any notification from the V8 Inspector is received.
  3395. */
  3396. addListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  3397. /**
  3398. * Issued when new execution context is created.
  3399. */
  3400. addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  3401. /**
  3402. * Issued when execution context is destroyed.
  3403. */
  3404. addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  3405. /**
  3406. * Issued when all executionContexts were cleared in browser
  3407. */
  3408. addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  3409. /**
  3410. * Issued when exception was thrown and unhandled.
  3411. */
  3412. addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  3413. /**
  3414. * Issued when unhandled exception was revoked.
  3415. */
  3416. addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  3417. /**
  3418. * Issued when console API was called.
  3419. */
  3420. addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  3421. /**
  3422. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  3423. */
  3424. addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  3425. /**
  3426. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  3427. */
  3428. addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  3429. /**
  3430. * Fired when virtual machine fails to parse the script.
  3431. */
  3432. addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  3433. /**
  3434. * Fired when breakpoint is resolved to an actual script and location.
  3435. */
  3436. addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  3437. /**
  3438. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  3439. */
  3440. addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  3441. /**
  3442. * Fired when the virtual machine resumed execution.
  3443. */
  3444. addListener(event: "Debugger.resumed", listener: () => void): this;
  3445. /**
  3446. * Issued when new console message is added.
  3447. */
  3448. addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  3449. /**
  3450. * Sent when new profile recording is started using console.profile() call.
  3451. */
  3452. addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  3453. addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  3454. addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  3455. addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  3456. addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  3457. /**
  3458. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  3459. */
  3460. addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  3461. /**
  3462. * If heap objects tracking has been started then backend may send update for one or more fragments
  3463. */
  3464. addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  3465. /**
  3466. * Contains an bucket of collected trace events.
  3467. */
  3468. addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  3469. /**
  3470. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  3471. * delivered via dataCollected events.
  3472. */
  3473. addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  3474. /**
  3475. * Issued when attached to a worker.
  3476. */
  3477. addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  3478. /**
  3479. * Issued when detached from the worker.
  3480. */
  3481. addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  3482. /**
  3483. * Notifies about a new protocol message received from the session
  3484. * (session ID is provided in attachedToWorker notification).
  3485. */
  3486. addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  3487. /**
  3488. * Fired when page is about to send HTTP request.
  3489. */
  3490. addListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  3491. /**
  3492. * Fired when HTTP response is available.
  3493. */
  3494. addListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  3495. addListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  3496. addListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  3497. /**
  3498. * Fired when data chunk was received over the network.
  3499. */
  3500. addListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  3501. /**
  3502. * This event is fired instead of `Runtime.executionContextDestroyed` when
  3503. * enabled.
  3504. * It is fired when the Node process finished all code execution and is
  3505. * waiting for all frontends to disconnect.
  3506. */
  3507. addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  3508. /**
  3509. * This event is fired when the runtime is waiting for the debugger. For
  3510. * example, when inspector.waitingForDebugger is called
  3511. */
  3512. addListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  3513. addListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  3514. addListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  3515. emit(event: string | symbol, ...args: any[]): boolean;
  3516. emit(event: "inspectorNotification", message: InspectorNotification<object>): boolean;
  3517. emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
  3518. emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
  3519. emit(event: "Runtime.executionContextsCleared"): boolean;
  3520. emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
  3521. emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
  3522. emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
  3523. emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
  3524. emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
  3525. emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
  3526. emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
  3527. emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
  3528. emit(event: "Debugger.resumed"): boolean;
  3529. emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
  3530. emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
  3531. emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
  3532. emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
  3533. emit(event: "HeapProfiler.resetProfiles"): boolean;
  3534. emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
  3535. emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
  3536. emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
  3537. emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
  3538. emit(event: "NodeTracing.tracingComplete"): boolean;
  3539. emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
  3540. emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
  3541. emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
  3542. emit(event: "Network.requestWillBeSent", message: InspectorNotification<Network.RequestWillBeSentEventDataType>): boolean;
  3543. emit(event: "Network.responseReceived", message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
  3544. emit(event: "Network.loadingFailed", message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
  3545. emit(event: "Network.loadingFinished", message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
  3546. emit(event: "Network.dataReceived", message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
  3547. emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
  3548. emit(event: "NodeRuntime.waitingForDebugger"): boolean;
  3549. emit(event: "Target.targetCreated", message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
  3550. emit(event: "Target.attachedToTarget", message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
  3551. on(event: string, listener: (...args: any[]) => void): this;
  3552. /**
  3553. * Emitted when any notification from the V8 Inspector is received.
  3554. */
  3555. on(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  3556. /**
  3557. * Issued when new execution context is created.
  3558. */
  3559. on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  3560. /**
  3561. * Issued when execution context is destroyed.
  3562. */
  3563. on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  3564. /**
  3565. * Issued when all executionContexts were cleared in browser
  3566. */
  3567. on(event: "Runtime.executionContextsCleared", listener: () => void): this;
  3568. /**
  3569. * Issued when exception was thrown and unhandled.
  3570. */
  3571. on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  3572. /**
  3573. * Issued when unhandled exception was revoked.
  3574. */
  3575. on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  3576. /**
  3577. * Issued when console API was called.
  3578. */
  3579. on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  3580. /**
  3581. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  3582. */
  3583. on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  3584. /**
  3585. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  3586. */
  3587. on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  3588. /**
  3589. * Fired when virtual machine fails to parse the script.
  3590. */
  3591. on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  3592. /**
  3593. * Fired when breakpoint is resolved to an actual script and location.
  3594. */
  3595. on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  3596. /**
  3597. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  3598. */
  3599. on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  3600. /**
  3601. * Fired when the virtual machine resumed execution.
  3602. */
  3603. on(event: "Debugger.resumed", listener: () => void): this;
  3604. /**
  3605. * Issued when new console message is added.
  3606. */
  3607. on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  3608. /**
  3609. * Sent when new profile recording is started using console.profile() call.
  3610. */
  3611. on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  3612. on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  3613. on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  3614. on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  3615. on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  3616. /**
  3617. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  3618. */
  3619. on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  3620. /**
  3621. * If heap objects tracking has been started then backend may send update for one or more fragments
  3622. */
  3623. on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  3624. /**
  3625. * Contains an bucket of collected trace events.
  3626. */
  3627. on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  3628. /**
  3629. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  3630. * delivered via dataCollected events.
  3631. */
  3632. on(event: "NodeTracing.tracingComplete", listener: () => void): this;
  3633. /**
  3634. * Issued when attached to a worker.
  3635. */
  3636. on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  3637. /**
  3638. * Issued when detached from the worker.
  3639. */
  3640. on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  3641. /**
  3642. * Notifies about a new protocol message received from the session
  3643. * (session ID is provided in attachedToWorker notification).
  3644. */
  3645. on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  3646. /**
  3647. * Fired when page is about to send HTTP request.
  3648. */
  3649. on(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  3650. /**
  3651. * Fired when HTTP response is available.
  3652. */
  3653. on(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  3654. on(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  3655. on(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  3656. /**
  3657. * Fired when data chunk was received over the network.
  3658. */
  3659. on(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  3660. /**
  3661. * This event is fired instead of `Runtime.executionContextDestroyed` when
  3662. * enabled.
  3663. * It is fired when the Node process finished all code execution and is
  3664. * waiting for all frontends to disconnect.
  3665. */
  3666. on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  3667. /**
  3668. * This event is fired when the runtime is waiting for the debugger. For
  3669. * example, when inspector.waitingForDebugger is called
  3670. */
  3671. on(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  3672. on(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  3673. on(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  3674. once(event: string, listener: (...args: any[]) => void): this;
  3675. /**
  3676. * Emitted when any notification from the V8 Inspector is received.
  3677. */
  3678. once(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  3679. /**
  3680. * Issued when new execution context is created.
  3681. */
  3682. once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  3683. /**
  3684. * Issued when execution context is destroyed.
  3685. */
  3686. once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  3687. /**
  3688. * Issued when all executionContexts were cleared in browser
  3689. */
  3690. once(event: "Runtime.executionContextsCleared", listener: () => void): this;
  3691. /**
  3692. * Issued when exception was thrown and unhandled.
  3693. */
  3694. once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  3695. /**
  3696. * Issued when unhandled exception was revoked.
  3697. */
  3698. once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  3699. /**
  3700. * Issued when console API was called.
  3701. */
  3702. once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  3703. /**
  3704. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  3705. */
  3706. once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  3707. /**
  3708. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  3709. */
  3710. once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  3711. /**
  3712. * Fired when virtual machine fails to parse the script.
  3713. */
  3714. once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  3715. /**
  3716. * Fired when breakpoint is resolved to an actual script and location.
  3717. */
  3718. once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  3719. /**
  3720. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  3721. */
  3722. once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  3723. /**
  3724. * Fired when the virtual machine resumed execution.
  3725. */
  3726. once(event: "Debugger.resumed", listener: () => void): this;
  3727. /**
  3728. * Issued when new console message is added.
  3729. */
  3730. once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  3731. /**
  3732. * Sent when new profile recording is started using console.profile() call.
  3733. */
  3734. once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  3735. once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  3736. once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  3737. once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  3738. once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  3739. /**
  3740. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  3741. */
  3742. once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  3743. /**
  3744. * If heap objects tracking has been started then backend may send update for one or more fragments
  3745. */
  3746. once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  3747. /**
  3748. * Contains an bucket of collected trace events.
  3749. */
  3750. once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  3751. /**
  3752. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  3753. * delivered via dataCollected events.
  3754. */
  3755. once(event: "NodeTracing.tracingComplete", listener: () => void): this;
  3756. /**
  3757. * Issued when attached to a worker.
  3758. */
  3759. once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  3760. /**
  3761. * Issued when detached from the worker.
  3762. */
  3763. once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  3764. /**
  3765. * Notifies about a new protocol message received from the session
  3766. * (session ID is provided in attachedToWorker notification).
  3767. */
  3768. once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  3769. /**
  3770. * Fired when page is about to send HTTP request.
  3771. */
  3772. once(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  3773. /**
  3774. * Fired when HTTP response is available.
  3775. */
  3776. once(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  3777. once(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  3778. once(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  3779. /**
  3780. * Fired when data chunk was received over the network.
  3781. */
  3782. once(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  3783. /**
  3784. * This event is fired instead of `Runtime.executionContextDestroyed` when
  3785. * enabled.
  3786. * It is fired when the Node process finished all code execution and is
  3787. * waiting for all frontends to disconnect.
  3788. */
  3789. once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  3790. /**
  3791. * This event is fired when the runtime is waiting for the debugger. For
  3792. * example, when inspector.waitingForDebugger is called
  3793. */
  3794. once(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  3795. once(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  3796. once(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  3797. prependListener(event: string, listener: (...args: any[]) => void): this;
  3798. /**
  3799. * Emitted when any notification from the V8 Inspector is received.
  3800. */
  3801. prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  3802. /**
  3803. * Issued when new execution context is created.
  3804. */
  3805. prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  3806. /**
  3807. * Issued when execution context is destroyed.
  3808. */
  3809. prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  3810. /**
  3811. * Issued when all executionContexts were cleared in browser
  3812. */
  3813. prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  3814. /**
  3815. * Issued when exception was thrown and unhandled.
  3816. */
  3817. prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  3818. /**
  3819. * Issued when unhandled exception was revoked.
  3820. */
  3821. prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  3822. /**
  3823. * Issued when console API was called.
  3824. */
  3825. prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  3826. /**
  3827. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  3828. */
  3829. prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  3830. /**
  3831. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  3832. */
  3833. prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  3834. /**
  3835. * Fired when virtual machine fails to parse the script.
  3836. */
  3837. prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  3838. /**
  3839. * Fired when breakpoint is resolved to an actual script and location.
  3840. */
  3841. prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  3842. /**
  3843. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  3844. */
  3845. prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  3846. /**
  3847. * Fired when the virtual machine resumed execution.
  3848. */
  3849. prependListener(event: "Debugger.resumed", listener: () => void): this;
  3850. /**
  3851. * Issued when new console message is added.
  3852. */
  3853. prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  3854. /**
  3855. * Sent when new profile recording is started using console.profile() call.
  3856. */
  3857. prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  3858. prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  3859. prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  3860. prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  3861. prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  3862. /**
  3863. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  3864. */
  3865. prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  3866. /**
  3867. * If heap objects tracking has been started then backend may send update for one or more fragments
  3868. */
  3869. prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  3870. /**
  3871. * Contains an bucket of collected trace events.
  3872. */
  3873. prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  3874. /**
  3875. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  3876. * delivered via dataCollected events.
  3877. */
  3878. prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  3879. /**
  3880. * Issued when attached to a worker.
  3881. */
  3882. prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  3883. /**
  3884. * Issued when detached from the worker.
  3885. */
  3886. prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  3887. /**
  3888. * Notifies about a new protocol message received from the session
  3889. * (session ID is provided in attachedToWorker notification).
  3890. */
  3891. prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  3892. /**
  3893. * Fired when page is about to send HTTP request.
  3894. */
  3895. prependListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  3896. /**
  3897. * Fired when HTTP response is available.
  3898. */
  3899. prependListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  3900. prependListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  3901. prependListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  3902. /**
  3903. * Fired when data chunk was received over the network.
  3904. */
  3905. prependListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  3906. /**
  3907. * This event is fired instead of `Runtime.executionContextDestroyed` when
  3908. * enabled.
  3909. * It is fired when the Node process finished all code execution and is
  3910. * waiting for all frontends to disconnect.
  3911. */
  3912. prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  3913. /**
  3914. * This event is fired when the runtime is waiting for the debugger. For
  3915. * example, when inspector.waitingForDebugger is called
  3916. */
  3917. prependListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  3918. prependListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  3919. prependListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  3920. prependOnceListener(event: string, listener: (...args: any[]) => void): this;
  3921. /**
  3922. * Emitted when any notification from the V8 Inspector is received.
  3923. */
  3924. prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<object>) => void): this;
  3925. /**
  3926. * Issued when new execution context is created.
  3927. */
  3928. prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
  3929. /**
  3930. * Issued when execution context is destroyed.
  3931. */
  3932. prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
  3933. /**
  3934. * Issued when all executionContexts were cleared in browser
  3935. */
  3936. prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
  3937. /**
  3938. * Issued when exception was thrown and unhandled.
  3939. */
  3940. prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
  3941. /**
  3942. * Issued when unhandled exception was revoked.
  3943. */
  3944. prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
  3945. /**
  3946. * Issued when console API was called.
  3947. */
  3948. prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
  3949. /**
  3950. * Issued when object should be inspected (for example, as a result of inspect() command line API call).
  3951. */
  3952. prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
  3953. /**
  3954. * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
  3955. */
  3956. prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
  3957. /**
  3958. * Fired when virtual machine fails to parse the script.
  3959. */
  3960. prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
  3961. /**
  3962. * Fired when breakpoint is resolved to an actual script and location.
  3963. */
  3964. prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
  3965. /**
  3966. * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
  3967. */
  3968. prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
  3969. /**
  3970. * Fired when the virtual machine resumed execution.
  3971. */
  3972. prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
  3973. /**
  3974. * Issued when new console message is added.
  3975. */
  3976. prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
  3977. /**
  3978. * Sent when new profile recording is started using console.profile() call.
  3979. */
  3980. prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
  3981. prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
  3982. prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
  3983. prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
  3984. prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
  3985. /**
  3986. * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
  3987. */
  3988. prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
  3989. /**
  3990. * If heap objects tracking has been started then backend may send update for one or more fragments
  3991. */
  3992. prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
  3993. /**
  3994. * Contains an bucket of collected trace events.
  3995. */
  3996. prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
  3997. /**
  3998. * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
  3999. * delivered via dataCollected events.
  4000. */
  4001. prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
  4002. /**
  4003. * Issued when attached to a worker.
  4004. */
  4005. prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
  4006. /**
  4007. * Issued when detached from the worker.
  4008. */
  4009. prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
  4010. /**
  4011. * Notifies about a new protocol message received from the session
  4012. * (session ID is provided in attachedToWorker notification).
  4013. */
  4014. prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
  4015. /**
  4016. * Fired when page is about to send HTTP request.
  4017. */
  4018. prependOnceListener(event: "Network.requestWillBeSent", listener: (message: InspectorNotification<Network.RequestWillBeSentEventDataType>) => void): this;
  4019. /**
  4020. * Fired when HTTP response is available.
  4021. */
  4022. prependOnceListener(event: "Network.responseReceived", listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
  4023. prependOnceListener(event: "Network.loadingFailed", listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
  4024. prependOnceListener(event: "Network.loadingFinished", listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
  4025. /**
  4026. * Fired when data chunk was received over the network.
  4027. */
  4028. prependOnceListener(event: "Network.dataReceived", listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
  4029. /**
  4030. * This event is fired instead of `Runtime.executionContextDestroyed` when
  4031. * enabled.
  4032. * It is fired when the Node process finished all code execution and is
  4033. * waiting for all frontends to disconnect.
  4034. */
  4035. prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
  4036. /**
  4037. * This event is fired when the runtime is waiting for the debugger. For
  4038. * example, when inspector.waitingForDebugger is called
  4039. */
  4040. prependOnceListener(event: "NodeRuntime.waitingForDebugger", listener: () => void): this;
  4041. prependOnceListener(event: "Target.targetCreated", listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
  4042. prependOnceListener(event: "Target.attachedToTarget", listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
  4043. }
  4044. }