Source

scope.bitbucket.org / scope / _sources / services / EcmascriptDebugger / EcmascriptDebugger_6_8.txt

Full commit
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
======================
EcmascriptDebugger 6.8
======================

:Generated:  hob rst-doc
:Version:    6.8
:Status:     Published

Service
=======


Central data types and how they work:

A "runtime" represents a document context in which threads execute.
There is a one-to-one mapping between runtimes and HTML documents.

A "thread" represents a thread of execution in a runtime.  A "parent"
thread can be preempted by another "child" thread in order to respond
to a priority event; the parent thread will not run again until the
child thread has finished.

A "script" is a pair (id, source code) where the id is globally
unique and the source code is Unicode text.

An "object" is represented by a globally unique ID that is assigned by
the debugger.

Globally unique means unique within a running Opera session; that is
from starting Opera to stopping it.

The windowID is shared across scope. Notably, it's the same as in the console logger and window manager
INTERNAL: The value is from Window::id


.. code-block:: c

  service EcmascriptDebugger
  {
    option (cpp_hfile) = "modules/scope/src/scope_ecmascript_debugger.h";

    option (version)   = "6.8";

    option (cpp_class) = ES_ScopeDebugFrontend;

  
    command ListRuntimes(RuntimeSelection)               returns (RuntimeList)               =  1;
    command ContinueThread(ThreadMode)                   returns (Default)                   =  2;
    command Eval(EvalData)                               returns (EvalResult)                =  3;
    command ExamineObjects(ExamineList)                  returns (ObjectChainList)           =  4;
    command SpotlightObject(SpotlightObjectSelection)    returns (Default)                   =  5;
    command AddBreakpoint(Breakpoint)                    returns (Default)                   =  6;
    command RemoveBreakpoint(BreakpointID)               returns (Default)                   =  7;
    command AddEventHandler(EventHandler)                returns (Default)                   =  8;
    command RemoveEventHandler(EventHandlerID)           returns (Default)                   =  9;
    command SetConfiguration(Configuration)              returns (Default)                   = 10;
    command GetBacktrace(BacktraceSelection)             returns (BacktraceFrameList)        = 11;
    command Break(BreakSelection)                        returns (Default)                   = 12;
    command InspectDom(DomTraversal)                     returns (NodeList)                  = 13;
    command CssGetIndexMap(Default)                      returns (CssIndexMap)               = 22;
    command CssGetAllStylesheets(RuntimeID)              returns (CssStylesheetList)         = 23;
    command CssGetStylesheet(CssStylesheetSelection)     returns (CssStylesheetRules)        = 24;
    command CssGetStyleDeclarations(CssElementSelection) returns (CssStyleDeclarations)      = 25;
    command GetSelectedObject(Default)                   returns (ObjectSelection)           = 26;
    command SpotlightObjects(SpotlightSelection)         returns (Default)                   = 27;
    command ReleaseObjects(ReleaseObjectsArg)            returns (Default)                   = 29;
    command SetPropertyFilter(SetPropertyFilterArg)      returns (Default)                   = 30;
    command AddEventBreakpoint(EventBreakpoint)          returns (Default)                   = 38;
    command SetFunctionFilter(FunctionFilter)            returns (Default)                   = 39;
    command SearchDom(SearchDomArg)                      returns (NodeList)                  = 42;
    event   OnRuntimeStarted                             returns (RuntimeInfo)               = 14;
    event   OnRuntimeStopped                             returns (RuntimeID)                 = 15;
    event   OnNewScript                                  returns (ScriptInfo)                = 16;
    event   OnThreadStarted                              returns (ThreadInfo)                = 17;
    event   OnThreadFinished                             returns (ThreadResult)              = 18;
    event   OnThreadStoppedAt                            returns (ThreadStopInfo)            = 19;
    event   OnHandleEvent                                returns (DomEvent)                  = 20;
    event   OnObjectSelected                             returns (ObjectSelection)           = 21;
    event   OnParseError                                 returns (DomParseError)             = 28;
    event   OnReadyStateChanged                          returns (ReadyStateInfo)            = 31;
    event   OnConsoleLog                                 returns (ConsoleLogInfo)            = 32;
    event   OnConsoleTime                                returns (ConsoleTimeInfo)           = 33;
    event   OnConsoleTimeEnd                             returns (ConsoleTimeEndInfo)        = 34;
    event   OnConsoleTrace                               returns (ConsoleTraceInfo)          = 35;
    event   OnConsoleProfile                             returns (ConsoleProfileInfo)        = 36;
    event   OnConsoleProfileEnd                          returns (ConsoleProfileEndInfo)     = 37;
    event   OnFunctionCallStarting                       returns (FunctionCallStartingInfo)  = 40;
    event   OnFunctionCallCompleted                      returns (FunctionCallCompletedInfo) = 41;
  }



Commands
========

.. index:: AddBreakpoint

``AddBreakpoint``
-----------------

::

  command AddBreakpoint(Breakpoint) returns (Default) = 6;


argument:

.. index:: Breakpoint

.. code-block:: c

  message Breakpoint
  {
    /**
     * A nonzero ID chosen by the client.
     */
    required uint32 breakpointID = 1;
    /**
     * ID of script where the breakpoint should be set.
     */
    required uint32 scriptID     = 2;
    /**
     * Line number to break on in script.
     */
    required uint32 lineNumber   = 3;
  }




.. index:: AddEventBreakpoint

``AddEventBreakpoint``
----------------------

::

  command AddEventBreakpoint(EventBreakpoint) returns (Default) = 38;


argument:

.. index:: EventBreakpoint

.. code-block:: c

  message EventBreakpoint
  {
    /**
     * A nonzero ID chosen by the client.
     */
    required uint32 breakpointID = 1;
    /**
     * The name of the event to break on.
     */
    required string eventType    = 2;
    /**
     * If specified the event will only break in this specific window.
     */
    optional uint32 windowID     = 3 [default = 0];
  }




.. index:: AddEventHandler

``AddEventHandler``
-------------------

::

  command AddEventHandler(EventHandler) returns (Default) = 8;

Add an event handler. This will generate a OnHandleEvent event every time the XML event defined
by the pair (`namespace`, `eventType`) reaches the object defined by `objectID` in the capturing
phase. XML events are defined in http://www.w3.org/TR/xml-events


argument:

.. index:: EventHandler

.. code-block:: c

  /**
   * Add an event handler. This will generate a HANDLE-EVENT event every time the XML event defined by the pair (NAMESPACE, EVENT-TYPE) reaches the object defined by OBJECT-ID in the capturing phase. XML events are defined in http://www.w3.org/TR/xml-events
   */
  message EventHandler
  {
    /**
     * A nonzero ID chosen by the client. The host may also use this ID to refer to the
     * event handler.
     */
    required uint32 handlerID             = 1;
    required uint32 objectID              = 2;
    /**
     * Namespace of the event. If empty, it will match any namespace.
     */
    required string namespace             = 3;
    required string eventType             = 4;
    /**
     * If `true` it prevents the default event handler from running.
     */
    required bool   preventDefaultHandler = 5;
    /**
     * If `true` it stops propagation of the event beyond this `objectID` (it will however run for all handlers on the object).
     */
    required bool   stopPropagation       = 6;
  }




.. index:: Break

``Break``
---------

::

  command Break(BreakSelection) returns (Default) = 12;


argument:

.. index:: BreakSelection

.. code-block:: c

  message BreakSelection
  {
    required uint32 runtimeID = 1;
    required uint32 threadID  = 2;
  }




.. index:: ContinueThread

``ContinueThread``
------------------

::

  command ContinueThread(ThreadMode) returns (Default) = 2;


argument:

.. index:: ThreadMode

.. code-block:: c

  message ThreadMode
  {
    required uint32 runtimeID = 1;
    required uint32 threadID  = 2;
    /**
     * One of:
     * - `"run"`
     * - `"step-into-call"`
     * - `"step-next-line"`
     * - `"step-out-of-call"`
     */
    required string mode      = 3;
  }




.. index:: CssGetAllStylesheets

``CssGetAllStylesheets``
------------------------

::

  command CssGetAllStylesheets(RuntimeID) returns (CssStylesheetList) = 23;


argument:

.. index:: RuntimeID

.. code-block:: c

  message RuntimeID
  {
    required uint32 runtimeID = 1;
  }

returns:

.. index:: CssStylesheetList

.. code-block:: c

  message CssStylesheetList
  {
    message Stylesheet
    {
      required uint32 objectID           = 1;
      required bool   isDisabled         = 2;
      required string href               = 3;
      required string title              = 4;
      required string type               = 5;
      repeated string mediaList          = 6;
      optional uint32 ownerNodeID        = 7;
      optional uint32 ownerRuleID        = 8;
      optional uint32 parentStylesheetID = 9;
    }
  
    repeated Stylesheet stylesheetList = 1;
  }



.. index:: CssGetIndexMap

``CssGetIndexMap``
------------------

::

  command CssGetIndexMap(Default) returns (CssIndexMap) = 22;



returns:

.. index:: CssIndexMap

.. code-block:: c

  message CssIndexMap
  {
    repeated string nameList = 1;
  }



.. index:: CssGetStyleDeclarations

``CssGetStyleDeclarations``
---------------------------

::

  command CssGetStyleDeclarations(CssElementSelection) returns (CssStyleDeclarations) = 25;


argument:

.. index:: CssElementSelection

.. code-block:: c

  message CssElementSelection
  {
    required uint32         runtimeID          = 1;
    required uint32         objectID           = 2;
    /**
     * Set this field to match rules with the specified pseudo selectors, even
     * if that rule is not currently applied.
     * 
     * The rule will match if either of the specified pseudo classes or pseudo
     * elements are used in the selector. Order does not matter.
     * 
     * This is handy for inspecting and modifying style rules for non-current
     * element states.
     * 
     * LINK and VISISTED are not supported for elements that are not links.
     * 
     * Using this field will not alter the state of the element. Selecting
     * HOVER, for instance, when an element is currently not hovered will
     * therefore not *apply* the HOVER style rules.
     * 
     * @since 6.5
     */
    repeated PseudoSelector pseudoSelectorList = 3;
  }

returns:

.. index:: CssStyleDeclarations

.. code-block:: c

  message CssStyleDeclarations
  {
    message NodeStyle
    {
      /**
       * Common to all origins:
       * - indexList
       * - valueList
       * - priorityList
       * - statusList
       * 
       * Common to AUTHOR and LOCAL
       * - selector
       * - specificity
       * 
       * For AUTHOR
       * - stylesheetID
       * - ruleID
       * - ruleType
       * 
       * For SVG
       * - specificity
       */
      message StyleDeclaration
      {
        required RuleOrigin        origin       =  1;
        repeated uint32            indexList    =  2;
        repeated string            valueList    =  3;
        repeated bool              priorityList =  4;
        repeated DeclarationStatus statusList   =  5;
        optional string            selector     =  6;
        optional uint32            specificity  =  7;
        optional uint32            stylesheetID =  8;
        optional uint32            ruleID       =  9;
        optional uint32            ruleType     = 10;
        /**
         * The original, stylesheet relative line number of this rule. The
         * line number refers to the start of the declaration block.
         * 
         * This field *may* be set for STYLE rules, but as the information
         * depends on an optional feature in Opera, some builds intended for
         * low-memory devices may not support this.
         * 
         * @since 6.6
         */
        optional uint32            lineNumber   = 11;
      }
    
      required uint32           objectID    = 1;
      required string           elementName = 2;
      repeated StyleDeclaration styleList   = 3;
    }
  
    repeated string    computedStyleList = 1;
    repeated NodeStyle nodeStyleList     = 2;
  }



.. index:: CssGetStylesheet

``CssGetStylesheet``
--------------------

::

  command CssGetStylesheet(CssStylesheetSelection) returns (CssStylesheetRules) = 24;


argument:

.. index:: CssStylesheetSelection

.. code-block:: c

  message CssStylesheetSelection
  {
    required uint32 runtimeID    = 1;
    required uint32 stylesheetID = 2;
  }

returns:

.. index:: CssStylesheetRules

.. code-block:: c

  message CssStylesheetRules
  {
    /**
     * Common to FONT_FACE, PAGE and STYLE is:
     * - indexList
     * - valueList
     * - priorityList
     * 
     * Common to STYLE and PAGE is:
     * - selectorList
     * - specificityList
     * 
     * Common to MEDIA and IMPORT
     * - mediaList
     * 
     * For MEDIA
     * - ruleList
     * 
     * For IMPORT
     * - href
     * - importStylesheetID
     * 
     * For PAGE
     * - pseudoClass
     * 
     * For CHARSET
     * - charset
     */
    message StylesheetRule
    {
      /**
       * Type values:
       * 0 - UNKNOWN
       * 1 - STYLE
       * 2 - CHARSET
       * 3 - IMPORT
       * 4 - MEDIA
       * 5 - FONT_FACE
       * 6 - PAGE
       * 7 - NAMESPACE // Not supported
       */
      required uint32                            type               =  1;
      required uint32                            stylesheetID       =  2;
      required uint32                            ruleID             =  3;
      repeated uint32                            indexList          =  4;
      repeated string                            valueList          =  5;
      repeated bool                              priorityList       =  6;
      /**
       * 0..1 for PAGE and 0..* for STYLE
       */
      repeated string                            selectorList       =  7;
      /**
       * 1..1 for PAGE and 0..* for STYLE
       */
      repeated uint32                            specificityList    =  8;
      repeated string                            mediaList          =  9;
      repeated CssStylesheetRules.StylesheetRule ruleList           = 10;
      optional string                            href               = 11;
      optional uint32                            importStylesheetID = 12;
      optional uint32                            pseudoClass        = 13;
      optional string                            charset            = 14;
      /**
       * The original, stylesheet relative line number of this rule. The
       * line number refers to the start of the declaration block.
       * 
       * This field *may* be set for STYLE rules, but as the information
       * depends on an optional feature in Opera, some builds intended for
       * low-memory devices may not support this.
       * 
       * @since 6.6
       */
      optional uint32                            lineNumber         = 15;
    }
  
    repeated StylesheetRule ruleList = 1;
  }



.. index:: Eval

``Eval``
--------

::

  command Eval(EvalData) returns (EvalResult) = 3;


argument:

.. index:: EvalData

.. code-block:: c

  message EvalData
  {
    message Variable
    {
      required string name     = 1;
      required uint32 objectID = 2;
    }
  
    required uint32   runtimeID     = 1;
    /**
     * The ID of the thread to use for executing the script data, or 0
     * to use the global scope.
     */
    required uint32   threadID      = 2;
    required uint32   frameIndex    = 3;
    /**
     * Represents a script to be executed.
     */
    required string   scriptData    = 4;
    /**
     * Represent variables to set.
     */
    repeated Variable variableList  = 5;
    /**
     * Enable debugging of current script eval. Defaults to false.
     * @since 6.3
     */
    optional bool     wantDebugging = 6 [default = false];
  }

returns:

.. index:: EvalResult

.. code-block:: c

  message EvalResult
  {
    /**
     * If it is "completed" or "unhandled-exception" then `type`, `value` and `objectValue` will be present.
     */
    required string      status      = 1;
    /**
     * One of:
     * - `"number"`
     * - `"boolean"`
     * - `"string"`
     * - `"null"`
     * - `"undefined"`
     * - `"object"`
     */
    required string      type        = 2;
    /**
     * Only present when `type` is `"number"`, `"string"` or `"boolean"`
     */
    optional string      value       = 3;
    /**
     * Only present when `type` is `"object"`
     */
    optional ObjectValue objectValue = 4;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }



.. index:: ExamineObjects

``ExamineObjects``
------------------

::

  command ExamineObjects(ExamineList) returns (ObjectChainList) = 4;


argument:

.. index:: ExamineList

.. code-block:: c

  message ExamineList
  {
    required uint32 runtimeID          = 1;
    repeated uint32 objectList         = 2;
    optional bool   examinePrototypes  = 3;
    optional bool   skipNonenumerables = 4;
    optional bool   filterProperties   = 5;
  }

returns:

.. index:: ObjectChainList

.. code-block:: c

  message ObjectChainList
  {
    repeated ObjectList objectChainList = 1;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: ObjectInfo

.. code-block:: c

  message ObjectInfo
  {
    /**
     * If `type` is ... then ... is present:
     *   "object", `objectValue`
     *   "number", `value`
     *   "string", `value`
     *   "boolean", `value` (`"true"` or `"false"`)
     * Otherwise (`"undefined"` or `"null"`), only `type` is present.
     */
    message Property
    {
      required string      name        = 1;
      /**
       * One of:
       * - `"number"`
       * - `"boolean"`
       * - `"string"`
       * - `"null"`
       * - `"undefined"`
       * - `"object"`
       * - `"script_getter"`               @since 6.7, value is undefined. The property has to be fetched by eval.
       * - `"function_caller_or_argument"` @since 6.7, value is undefined. The property is a function argument or function caller.
       */
      required string      type        = 2;
      /**
       * Only present for `"number"`, `"string"` or `"boolean"`
       */
      optional string      value       = 3;
      /**
       * Only present for `"object"`
       */
      optional ObjectValue objectValue = 4;
    }
  
    required ObjectValue value        = 1;
    repeated Property    propertyList = 2;
  }

.. index:: ObjectList

.. code-block:: c

  message ObjectList
  {
    repeated ObjectInfo objectList = 1;
  }



.. index:: GetBacktrace

``GetBacktrace``
----------------

::

  command GetBacktrace(BacktraceSelection) returns (BacktraceFrameList) = 11;


argument:

.. index:: BacktraceSelection

.. code-block:: c

  message BacktraceSelection
  {
    required uint32 runtimeID = 1;
    required uint32 threadID  = 2;
    /**
     * If omitted (or 0) all frames are returned.
     */
    optional uint32 maxFrames = 3 [default = 0];
  }

returns:

.. index:: BacktraceFrameList

.. code-block:: c

  /**
   * Frames are in innermost-first order.
   */
  message BacktraceFrameList
  {
    repeated BacktraceFrame frameList = 1;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: BacktraceFrame

.. code-block:: c

  message BacktraceFrame
  {
    required uint32      functionID     =  1;
    required uint32      argumentObject =  2;
    required uint32      variableObject =  3;
    required uint32      thisObject     =  4;
    /**
     * TODO: Spec says repeated, while the code only assumes one (optional)
     */
    optional ObjectValue objectValue    =  5;
    optional uint32      scriptID       =  6;
    optional uint32      lineNumber     =  7;
    /**
     * The variable objects in the scope chain of the function. The first
     * element in the list is the innermost scope (the scope of the function
     * itself). The list includes the global scope.
     * 
     * @since 6.1
     */
    repeated uint32      scopeList      =  8;
    /**
     * The full value of the 'arguments' object.
     * 
     * @since 6.2
     */
    optional ObjectValue argumentValue  =  9;
    /**
     * The full value of the 'this' object.
     * 
     * @since 6.2
     */
    optional ObjectValue thisValue      = 10;
  }



.. index:: GetSelectedObject

``GetSelectedObject``
---------------------

::

  command GetSelectedObject(Default) returns (ObjectSelection) = 26;



returns:

.. index:: ObjectSelection

.. code-block:: c

  message ObjectSelection
  {
    required uint32 objectID  = 1;
    required uint32 windowID  = 2;
    optional uint32 runtimeID = 3;
  }



.. index:: InspectDom

``InspectDom``
--------------

::

  command InspectDom(DomTraversal) returns (NodeList) = 13;


argument:

.. index:: DomTraversal

.. code-block:: c

  message DomTraversal
  {
    required uint32 objectID  = 1;
    /**
     * traversal on off:
     * - `"parent-node-chain-with-children"`
     *     take the parent node chain for the target node.
     *     add for each node in that chain all children,
     *     and for all children there first child,
     *     if that is a text node and the only node,
     *     starting with the document node.
     * - `"children"`
     *     get node data for all children in their flow
     * - `"node"
     *     get node data for that node
     * - `"subtree"`
     *     get node data for the subtree in the flow of it
     */
    required string traversal = 2;
  }

returns:

.. index:: NodeList

.. code-block:: c

  message NodeList
  {
    repeated NodeInfo nodeList = 1;
  }

references:

.. index:: ObjectReference

.. code-block:: c

  /**
   * Refers to an object and its parent runtime.
   */
  message ObjectReference
  {
    required uint32 runtimeID = 1;
    required uint32 objectID  = 2;
  }

.. index:: PseudoElement

.. code-block:: c

  /**
   * Represents a pseudo element, such as ::after, ::before, and so forth.
   * 
   * @since 6.5
   */
  message PseudoElement
  {
    enum Type
    {
      BEFORE = 1;
      AFTER = 2;
      FIRST_LETTER = 3;
      FIRST_LINE = 4;
    }
  
    required Type   type    = 1;
    /**
     * If a ::before or ::after rule uses the 'content' property to insert
     * text content, this field will contain that content.
     */
    optional string content = 2;
  }

.. index:: NodeInfo

.. code-block:: c

  message NodeInfo
  {
    message Attribute
    {
      required string namePrefix = 1;
      required string name       = 2;
      required string value      = 3;
    }
  
    /**
     * Values in this enum explain why the node was included in the response.
     */
    enum MatchReason
    {
      /**
       * The node was included because we explicitly traversed the DOM
       * (sub-)tree.
       */
      TRAVERSAL = 1;
      /**
       * The node was included because it is an ancestor of a node hit by a
       * search.
       */
      SEARCH_ANCESTOR = 2;
      /**
       * The node was included because it was directly hit by a search.
       */
      SEARCH_HIT = 3;
    }
  
    required uint32          objectID          =  1;
    /**
     * Values:
     * 
     * 1 - ELEMENT
     * 2 - ATTRIBUTE
     * 3 - TEXT
     * 4 - CDATA_SECTION
     * 5 - ENTITY_REFERENCE
     * 6 - ENTITY
     * 7 - PROCESSING_INSTRUCTION
     * 8 - COMMENT
     * 9 - DOCUMENT
     * 10 - DOCUMENT_TYPE
     * 11 - DOCUMENT_FRAGMENT
     * 12 - NOTATION
     * 13 - XPATH_NAMESPACE
     * 14 - SVG_ELEMENTINSTANCE
     */
    required uint32          type              =  2;
    required string          name              =  3;
    required uint32          depth             =  4;
    /**
     * Used if type is 1.
     */
    optional string          namespacePrefix   =  5;
    /**
     * Used if type is 1.
     */
    repeated Attribute       attributeList     =  6;
    /**
     * Used if type is 1.
     */
    optional uint32          childrenLength    =  7;
    /**
     * Used if type is 3, 4, 7 or 8.
     */
    optional string          value             =  8;
    /**
     * Used if type is 10.
     */
    optional string          publicID          =  9;
    /**
     * Used if type is 10.
     */
    optional string          systemID          = 10;
    /**
     * The runtime ID of this node. This field will always be set.
     * 
     * @since 6.5
     */
    optional uint32          runtimeID         = 11;
    /**
     * If the node type is an ELEMENT (1) which contains another document,
     * (frame, iframe, or object), this field will be set with a reference to
     * the document node contained within that element.
     * 
     * The field will not be set if the element does not contain a document.
     * 
     * @since 6.5
     */
    optional ObjectReference contentDocument   = 12;
    /**
     * Like 'contentDocument', but the other direction; if this node is
     * a DOCUMENT (9) node, then this field will be set with a reference to the
     * element that contains the document in the parent runtime.
     * 
     * The field will not be set if the document node represents a top-level
     * document.
     * 
     * @since 6.5
     */
    optional ObjectReference frameElement      = 13;
    /**
     * Explains why the node was included in the response. This field will
     * always be set.
     * 
     * When this message is a response to DOM inspection, this field will be set
     * to TRAVERSAL. When sent as a response to a search, it will either be set
     * to SEARCH_HIT, or SEARCH_PARENT. 
     * 
     * @since 6.5
     */
    optional MatchReason     matchReason       = 14;
    /**
     * If the node has pseudo elements applied, this list will contain those
     * elements.
     * 
     * @since 6.5
     */
    repeated PseudoElement   pseudoElementList = 15;
  }



.. index:: ListRuntimes

``ListRuntimes``
----------------

::

  command ListRuntimes(RuntimeSelection) returns (RuntimeList) = 1;


argument:

.. index:: RuntimeSelection

.. code-block:: c

  message RuntimeSelection
  {
    /**
     * List the ones you want to see, or none if you want all (also set `allRuntimes`).
     */
    repeated uint32 runtimeList = 1;
    /**
     * Create runtimes for all documents. Runtimes are normally not created for documents
     * without ECMAScript.
     */
    optional bool   allRuntimes = 2;
  }

returns:

.. index:: RuntimeList

.. code-block:: c

  message RuntimeList
  {
    repeated RuntimeInfo runtimeList = 1;
  }

references:

.. index:: RuntimeInfo

.. code-block:: c

  message RuntimeInfo
  {
    required uint32 runtimeID     = 1;
    required string htmlFramePath = 2;
    /**
     * The ID of the window this runtime is associated with, if the runtime is
     * associated with a single window. If the runtime is associated with more
     * (or less) than one window, the field will be set to zero. Refer to the
     * ``windowIDList`` field for more information.
     */
    required uint32 windowID      = 3;
    /**
     * the 'global' object
     */
    required uint32 objectID      = 4;
    /**
     * the document's URI
     */
    required string uri           = 5;
    /**
     * A short description of the nature of the runtime, for instance
     * "document", or "webworker".
     * 
     * @since 6.2
     */
    optional string description   = 6;
    /**
     * A list of all windows this runtime is associated with. Normally, this
     * will only contain one window, but some runtimes, for instance shared
     * WebWorkers, can be associated with multiple (zero or more) windows.
     * 
     * @since 6.2
     */
    repeated uint32 windowIDList  = 7;
  }



.. index:: ReleaseObjects

``ReleaseObjects``
------------------

::

  command ReleaseObjects(ReleaseObjectsArg) returns (Default) = 29;

Release protected ECMAScript objects. This will just make them garbage
collectible. Released objects are not necessarily freed immediately.

Calling ReleaseObjects with an empty list causes all objects to be
released. Otherwise, only the specified objects will be released.
Attempting to release a non-existent object has no effect, and will
fail silently.

Releasing objects invalidates associated object IDs immediately.


argument:

.. index:: ReleaseObjectsArg

.. code-block:: c

  /**
   * List of objects to release.
   */
  message ReleaseObjectsArg
  {
    repeated uint32 objectList = 1;
  }




.. index:: RemoveBreakpoint

``RemoveBreakpoint``
--------------------

::

  command RemoveBreakpoint(BreakpointID) returns (Default) = 7;


argument:

.. index:: BreakpointID

.. code-block:: c

  message BreakpointID
  {
    /**
     * See Breakpoint.breakpointID.
     */
    required uint32 breakpointID = 1;
  }




.. index:: RemoveEventHandler

``RemoveEventHandler``
----------------------

::

  command RemoveEventHandler(EventHandlerID) returns (Default) = 9;


argument:

.. index:: EventHandlerID

.. code-block:: c

  message EventHandlerID
  {
    /**
     * `handlerID` as specified in EventHandler.handlerID.
     */
    required uint32 handlerID = 1;
  }




.. index:: SearchDom

``SearchDom``
-------------

::

  command SearchDom(SearchDomArg) returns (NodeList) = 42;

Search the DOM of a document, using either plain text, regexp, xpath
or CSS selectors.

For plain text and regular expression searches, tag names, attribute
names, attribute values and text content is searched through. Regular
expressions searches use the same backend as the RegExp object in
ECMAScript, and therefore use the same syntax and semantics.

CSS selector or XPath searches work like their DOM counterparts
(document.querySelector, and document.evaluate). For more information,
see:

- http://www.w3.org/TR/selectors-api/
- http://www.w3.org/TR/DOM-Level-3-XPath/

Whenever a matching node is found, that node is included in the command
response, and marked as a search hit. The parent chain is also included
for each hit; however, no parent is included twice (nor is any 'hit'
included twice).

@since 6.5


argument:

.. index:: SearchDomArg

.. code-block:: c

  /**
   * Argument to SearchDom command.
   * 
   * @since 6.5
   */
  message SearchDomArg
  {
    enum Type
    {
      /**
       * Search tag names, attribute names, attribute values, and text content
       * for an ocurrence of the specified string.
       * 
       * The query string "strong", for instance, would match all <strong>
       * nodes as well as text content and attribute values with "strong"
       * in them.
       */
      PLAIN_TEXT = 1;
      /**
       * Match tag names, attribute names, attribute values, and text content
       * against a specified regular expression. Do not delimit the query
       * string Perl-style ("/foo/"). Provide the plain regex string only
       * ("foo").
       * 
       * The regular expression "[0-9]+", for instance, would match all text
       * nodes and attribute values containing digits.
       * 
       * Regular expression searches use the same syntax and semantics as
       * the RegExp object in ECMAScript.
       */
      REGEXP = 2;
      /**
       * Matches nodes according to an XPath expression.
       * 
       * "//p", for instance, matches all <p> nodes.
       */
      XPATH = 3;
      /**
       * Matches nodes according to a CSS selector.
       * 
       * For instance, "div" matches all <div> nodes, and ".box" matches
       * all nodes with the class "box".
       */
      SELECTOR = 4;
    }
  
    /**
     * Search the DOM of this runtime.
     */
    required uint32 runtimeID  = 1;
    /**
     * The string to search for.
     */
    required string query      = 2;
    optional Type   type       = 3 [default = PLAIN_TEXT];
    /**
     * If present, search only the subtree of this node.
     */
    optional uint32 objectID   = 4;
    /**
     * Set to TRUE to ignore case (REGEXP and PLAIN_TEXT only). If set to
     * FALSE, which is the default, case will be respected.
     */
    optional bool   ignoreCase = 5 [default = false];
  }

returns:

.. index:: NodeList

.. code-block:: c

  message NodeList
  {
    repeated NodeInfo nodeList = 1;
  }

references:

.. index:: ObjectReference

.. code-block:: c

  /**
   * Refers to an object and its parent runtime.
   */
  message ObjectReference
  {
    required uint32 runtimeID = 1;
    required uint32 objectID  = 2;
  }

.. index:: PseudoElement

.. code-block:: c

  /**
   * Represents a pseudo element, such as ::after, ::before, and so forth.
   * 
   * @since 6.5
   */
  message PseudoElement
  {
    enum Type
    {
      BEFORE = 1;
      AFTER = 2;
      FIRST_LETTER = 3;
      FIRST_LINE = 4;
    }
  
    required Type   type    = 1;
    /**
     * If a ::before or ::after rule uses the 'content' property to insert
     * text content, this field will contain that content.
     */
    optional string content = 2;
  }

.. index:: NodeInfo

.. code-block:: c

  message NodeInfo
  {
    message Attribute
    {
      required string namePrefix = 1;
      required string name       = 2;
      required string value      = 3;
    }
  
    /**
     * Values in this enum explain why the node was included in the response.
     */
    enum MatchReason
    {
      /**
       * The node was included because we explicitly traversed the DOM
       * (sub-)tree.
       */
      TRAVERSAL = 1;
      /**
       * The node was included because it is an ancestor of a node hit by a
       * search.
       */
      SEARCH_ANCESTOR = 2;
      /**
       * The node was included because it was directly hit by a search.
       */
      SEARCH_HIT = 3;
    }
  
    required uint32          objectID          =  1;
    /**
     * Values:
     * 
     * 1 - ELEMENT
     * 2 - ATTRIBUTE
     * 3 - TEXT
     * 4 - CDATA_SECTION
     * 5 - ENTITY_REFERENCE
     * 6 - ENTITY
     * 7 - PROCESSING_INSTRUCTION
     * 8 - COMMENT
     * 9 - DOCUMENT
     * 10 - DOCUMENT_TYPE
     * 11 - DOCUMENT_FRAGMENT
     * 12 - NOTATION
     * 13 - XPATH_NAMESPACE
     * 14 - SVG_ELEMENTINSTANCE
     */
    required uint32          type              =  2;
    required string          name              =  3;
    required uint32          depth             =  4;
    /**
     * Used if type is 1.
     */
    optional string          namespacePrefix   =  5;
    /**
     * Used if type is 1.
     */
    repeated Attribute       attributeList     =  6;
    /**
     * Used if type is 1.
     */
    optional uint32          childrenLength    =  7;
    /**
     * Used if type is 3, 4, 7 or 8.
     */
    optional string          value             =  8;
    /**
     * Used if type is 10.
     */
    optional string          publicID          =  9;
    /**
     * Used if type is 10.
     */
    optional string          systemID          = 10;
    /**
     * The runtime ID of this node. This field will always be set.
     * 
     * @since 6.5
     */
    optional uint32          runtimeID         = 11;
    /**
     * If the node type is an ELEMENT (1) which contains another document,
     * (frame, iframe, or object), this field will be set with a reference to
     * the document node contained within that element.
     * 
     * The field will not be set if the element does not contain a document.
     * 
     * @since 6.5
     */
    optional ObjectReference contentDocument   = 12;
    /**
     * Like 'contentDocument', but the other direction; if this node is
     * a DOCUMENT (9) node, then this field will be set with a reference to the
     * element that contains the document in the parent runtime.
     * 
     * The field will not be set if the document node represents a top-level
     * document.
     * 
     * @since 6.5
     */
    optional ObjectReference frameElement      = 13;
    /**
     * Explains why the node was included in the response. This field will
     * always be set.
     * 
     * When this message is a response to DOM inspection, this field will be set
     * to TRAVERSAL. When sent as a response to a search, it will either be set
     * to SEARCH_HIT, or SEARCH_PARENT. 
     * 
     * @since 6.5
     */
    optional MatchReason     matchReason       = 14;
    /**
     * If the node has pseudo elements applied, this list will contain those
     * elements.
     * 
     * @since 6.5
     */
    repeated PseudoElement   pseudoElementList = 15;
  }



.. index:: SetConfiguration

``SetConfiguration``
--------------------

::

  command SetConfiguration(Configuration) returns (Default) = 10;


argument:

.. index:: Configuration

.. code-block:: c

  message Configuration
  {
    optional bool stopAtScript            = 1 [default = true];
    optional bool stopAtException         = 2 [default = false];
    optional bool stopAtError             = 3 [default = false];
    optional bool stopAtAbort             = 4 [default = false];
    optional bool stopAtGc                = 5 [default = false];
    optional bool stopAtDebuggerStatement = 6 [default = false];
  }




.. index:: SetFunctionFilter

``SetFunctionFilter``
---------------------

::

  command SetFunctionFilter(FunctionFilter) returns (Default) = 39;

Specify which objects to get OnFunctionCallStarting and OnFunctionCallCompleted events for. 
If a function is called on an object with a matching class name, the events will be reported.

The default filter is empty, meaning no function calls will be reported.
@since 6.4


argument:

.. index:: FunctionFilter

.. code-block:: c

  message FunctionFilter
  {
    /**
     * Match the function call if any of the class names appear in the
     * prototype chain of a given 'this' object.
     */
    repeated string classList = 1;
  }




.. index:: SetPropertyFilter

``SetPropertyFilter``
---------------------

::

  command SetPropertyFilter(SetPropertyFilterArg) returns (Default) = 30;

Sets a new property filter which may hide some properties when examining an object. This
is useful for excluding many 'uninteresting' properties found on built-in prototypes.

Calling this will overwrite the previous filter.


argument:

.. index:: SetPropertyFilterArg

.. code-block:: c

  message SetPropertyFilterArg
  {
    required PropertyFilter propertyFilter = 1;
  }


references:

.. index:: PropertyFilter

.. code-block:: c

  /**
   * Because we want different filters for different classes, a PropertyFilter consists
   * of several ClassMasks, and one ClassMask consists of several PropertyMasks. A PropertyMask
   * can be regarded as a 'rule' for filtering a property. If no rule is present, the property is
   * allowed through the filter. If a matching rule is present, the property is not included.
   */
  message PropertyFilter
  {
    /**
     * A ClassMask contains all the properties which should be considered for exclusion for a
     * certain class.
     */
    message ClassMask
    {
      /**
       * You can choose to filter a property based on name and, as an additional condition, type.
       * For booleans, numbers and strings, you can also filter by value as a third additional
       * condition.
       * 
       * If only 'name' is present, then a property with that name will be excluded, regardless
       * of its value. If 'type' is also present, then the property with that name will be excluded
       * only if its value is the specified type.
       * 
       * If 'type' indicates a boolean, number or string, you can assign a value in the corresponding
       * optional field. The property will then be excluded only if the name, type and value all match.
       */
      message PropertyMask
      {
        required string name    = 1;
        optional uint32 type    = 2;
        optional bool   boolean = 3;
        optional uint32 number  = 4;
        optional string string  = 5;
      }
    
      /**
       * The name of the class this filter applies to. Examples are 'Object' and
       * 'HTMLHtmlElement'.
       */
      required string       className        = 1;
      /**
       * The list of properties which could be filtered.
       */
      repeated PropertyMask propertyMaskList = 2;
    }
  
    /**
     * The list of classes which should be filtered.
     */
    repeated ClassMask classMaskList = 1;
  }



.. index:: SpotlightObject

``SpotlightObject``
-------------------

::

  command SpotlightObject(SpotlightObjectSelection) returns (Default) = 5;


argument:

.. index:: SpotlightObjectSelection

.. code-block:: c

  message SpotlightObjectSelection
  {
    /**
     * Using `0` clears the spotlight.
     */
    required uint32 objectID       = 1;
    /**
     * Chooses whether the given object should be scrolled into view or not.
     */
    required bool   scrollIntoView = 2;
  }




.. index:: SpotlightObjects

``SpotlightObjects``
--------------------

::

  command SpotlightObjects(SpotlightSelection) returns (Default) = 27;


argument:

.. index:: SpotlightSelection

.. code-block:: c

  /**
   * To highlight elements in the document
   */
  message SpotlightSelection
  {
    repeated SpotlightObject spotlightObjectList = 1;
  }


references:

.. index:: SpotlightObject

.. code-block:: c

  /**
   * The drawing order is box, reference-box-frame, box-frame, grid.
   */
  message SpotlightObject
  {
    /**
     * Colors are encoded as RGBA with 8 bits for each channel.
     * encoded_color = ( red << 24 ) + ( green << 16 ) + ( blue << 8 ) + ( alpha )
     * with red, green, blue and alpha in a range of 0 - 255
     * e.g.:
     * 
     *     red     4278190335
     *     green     16711935
     *     blue         65535
     *     yellow  4294902015
     *     cyan      16777215
     *     magenta 4278255615
     */
    message SpotlightBox
    {
      /**
       * Valid values:
       *   0: dimension
       *   1: padding
       *   2: border
       *   3: margin
       */
      required uint32 boxType    = 1;
      optional uint32 fillColor  = 2;
      /**
       * Drawn with 1px width inside the box
       */
      optional uint32 frameColor = 3;
      /**
       * Drawn with 1px width inside the box over the whole document
       */
      optional uint32 gridColor  = 4;
    }
  
    required uint32       objectID       = 1;
    /**
     * Chooses whether the given object should be scrolled into view or not.
     */
    required bool         scrollIntoView = 2;
    repeated SpotlightBox boxList        = 3;
  }



Events
======

.. index:: OnConsoleLog

``OnConsoleLog``
----------------

::

  event OnConsoleLog returns (ConsoleLogInfo) = 32;

This event occurs when the script calls one of these functions:

  1. console.log
  2. console.debug
  3. console.info
  4. console.warn
  5. console.error
  6. console.assert
  7. console.dir
  8. console.dirxml
  9. console.group
  10. console.groupCollapsed
  11. console.groupEnded
  12. console.count
  13. console.table

All the functions behave the same way; they accept any number of arguments, and sends them to the client.

The console.assert function is a special case, which outputs nothing if the first argument evaluates to
true. Otherwise, it behaves like the other functions and sends its arguments to the client (including the
first argument which triggered the assertion). If the assertion fails, it also throws an exception.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleLogInfo
  {
    message Value
    {
      optional string      value       = 1;
      optional ObjectValue objectValue = 2;
    }
  
    required uint32   runtimeID = 1;
    /**
     * This value indicates which function was called:
     * 
     * 1 - console.log
     * 2 - console.debug
     * 3 - console.info
     * 4 - console.warn
     * 5 - console.error
     * 6 - console.assert
     * 7 - console.dir
     * 8 - console.dirxml
     * 9 - console.group
     * 10 - console.groupCollapsed
     * 11 - console.groupEnded
     * 12 - console.count
     * 13 - console.table
     */
    required uint32   type      = 2;
    /**
     * The list of values passed to the function as arguments.
     */
    repeated Value    valueList = 3;
    /**
     * The position the function was called.
     */
    optional Position position  = 4;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: Position

.. code-block:: c

  message Position
  {
    required uint32 scriptID   = 1;
    required uint32 lineNumber = 2;
  }



.. index:: OnConsoleProfile

``OnConsoleProfile``
--------------------

::

  event OnConsoleProfile returns (ConsoleProfileInfo) = 36;

Occurs when console.profile is called in a script. Note that profiling is not yet supported.
This event is just included to let the client know that the function has been called.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleProfileInfo
  {
    required uint32 runtimeID = 1;
  }



.. index:: OnConsoleProfileEnd

``OnConsoleProfileEnd``
-----------------------

::

  event OnConsoleProfileEnd returns (ConsoleProfileEndInfo) = 37;

Occurs when console.profileEdd is called in a script. Note that profiling is not yet supported.
This event is just included to let the client know that the function has been called.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleProfileEndInfo
  {
    required uint32 runtimeID = 1;
  }



.. index:: OnConsoleTime

``OnConsoleTime``
-----------------

::

  event OnConsoleTime returns (ConsoleTimeInfo) = 33;

Occurs when console.time is called in the script. When this event occurs, Opera will start a
timer which can be referred to by the specified title. The timer can later be stopped with
console.timeEnd, which will calculate the elapsed time between the two calls.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleTimeInfo
  {
    required uint32 runtimeID = 1;
    /**
     * Timers are identified by a string passed as the first argument
     * to the function. For instance, console.time("MyTimer").
     */
    required string title     = 2;
  }



.. index:: OnConsoleTimeEnd

``OnConsoleTimeEnd``
--------------------

::

  event OnConsoleTimeEnd returns (ConsoleTimeEndInfo) = 34;

Occurs when console.timeEnd is called in the script. The message contains the elapsed time between
the corresponding call to console.time (see OnConsoleTime).


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleTimeEndInfo
  {
    required uint32 runtimeID = 1;
    /**
     * The title of the timer. See ConsoleTimeInfo.title.
     */
    required string title     = 2;
    /**
     * Elapsed time in microseconds.
     */
    required uint32 elapsed   = 3;
  }



.. index:: OnConsoleTrace

``OnConsoleTrace``
------------------

::

  event OnConsoleTrace returns (ConsoleTraceInfo) = 35;

Occurs when console.trace is called in the script. Sends the stack trace at the position
where the call was made.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ConsoleTraceInfo
  {
    required uint32         runtimeID = 1;
    /**
     * The list of stack frames at the level console.trace was called.
     */
    repeated BacktraceFrame frameList = 2;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: BacktraceFrame

.. code-block:: c

  message BacktraceFrame
  {
    required uint32      functionID     =  1;
    required uint32      argumentObject =  2;
    required uint32      variableObject =  3;
    required uint32      thisObject     =  4;
    /**
     * TODO: Spec says repeated, while the code only assumes one (optional)
     */
    optional ObjectValue objectValue    =  5;
    optional uint32      scriptID       =  6;
    optional uint32      lineNumber     =  7;
    /**
     * The variable objects in the scope chain of the function. The first
     * element in the list is the innermost scope (the scope of the function
     * itself). The list includes the global scope.
     * 
     * @since 6.1
     */
    repeated uint32      scopeList      =  8;
    /**
     * The full value of the 'arguments' object.
     * 
     * @since 6.2
     */
    optional ObjectValue argumentValue  =  9;
    /**
     * The full value of the 'this' object.
     * 
     * @since 6.2
     */
    optional ObjectValue thisValue      = 10;
  }



.. index:: OnFunctionCallCompleted

``OnFunctionCallCompleted``
---------------------------

::

  event OnFunctionCallCompleted returns (FunctionCallCompletedInfo) = 41;

Occurs when a function call has completed.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message FunctionCallCompletedInfo
  {
    enum Result
    {
      /**
       * This result means that the function completed without
       * throwing an exception.
       */
      SUCCESS = 1;
      /**
       * The function could not return. The 'returnValue' field
       * contains the thrown value instead of the return value.
       */
      EXCEPTION = 2;
    }
  
    /**
     * Which runtime the call ocurred in.
     */
    required uint32 runtimeID   = 1;
    required uint32 threadID    = 2;
    /**
     * Milliseconds since epoch, at the time the call completed.
     */
    required double time        = 3;
    required Result result      = 4;
    optional Value  returnValue = 5;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: Value

.. code-block:: c

  /**
   * Represents an ECMAScript value, a value is either one of the primitives
   * like string or boolean or an object.
   */
  message Value
  {
    enum Type
    {
      /**
       * The undefined type, returned when no value was found or "undefined"
       * was referenced.
       */
      UNDEFINED = 0;
      /**
       * A null value.
       */
      NULL = 1;
      /**
       * Boolean value true.
       */
      TRUE = 2;
      /**
       * Boolean value false.
       */
      FALSE = 3;
      /**
       * NaN value which cannot be exported to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("NaN")
       */
      NAN = 4;
      /**
       * Plus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("Infinity")
       */
      PLUS_INFINITY = 5;
      /**
       * Minus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("-Infinity")
       */
      MINUS_INFINITY = 6;
      /**
       * A number, use the field 'number' for the actual value.
       */
      NUMBER = 7;
      /**
       * A string, use the field 'str' for the actual string data.
       */
      STRING = 8;
      /**
       * An object, the field 'object' contains object details.
       */
      OBJECT = 9;
    }
  
    /**
     * The type of value.
     * 
     * @note Booleans are encoded as either TRUE or FALSE to shorten the number
     * fields in use.
     */
    optional Type        type   = 1;
    /**
     * The numeric value, set if type = NUMBER.
     */
    optional double      number = 2;
    /**
     * The string, set if type = STRING.
     */
    optional string      str    = 3;
    /**
     * Object information, set if type = OBJECT.
     */
    optional ObjectValue object = 4;
  }



.. index:: OnFunctionCallStarting

``OnFunctionCallStarting``
--------------------------

::

  event OnFunctionCallStarting returns (FunctionCallStartingInfo) = 40;

Occurs when a function call is about to be performed.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message FunctionCallStartingInfo
  {
    /**
     * Which runtime the call ocurred in.
     */
    required uint32      runtimeID      = 1;
    required uint32      threadID       = 2;
    /**
     * Milliseconds since epoch, at the time the call started.
     */
    required double      time           = 3;
    required ObjectValue thisObject     = 4;
    required ObjectValue functionObject = 5;
    repeated Value       argumentList   = 6;
    /**
     * The position where the call was made, or missing if
     * the call did not come from a script.
     */
    optional Position    position       = 7;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: Value

.. code-block:: c

  /**
   * Represents an ECMAScript value, a value is either one of the primitives
   * like string or boolean or an object.
   */
  message Value
  {
    enum Type
    {
      /**
       * The undefined type, returned when no value was found or "undefined"
       * was referenced.
       */
      UNDEFINED = 0;
      /**
       * A null value.
       */
      NULL = 1;
      /**
       * Boolean value true.
       */
      TRUE = 2;
      /**
       * Boolean value false.
       */
      FALSE = 3;
      /**
       * NaN value which cannot be exported to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("NaN")
       */
      NAN = 4;
      /**
       * Plus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("Infinity")
       */
      PLUS_INFINITY = 5;
      /**
       * Minus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("-Infinity")
       */
      MINUS_INFINITY = 6;
      /**
       * A number, use the field 'number' for the actual value.
       */
      NUMBER = 7;
      /**
       * A string, use the field 'str' for the actual string data.
       */
      STRING = 8;
      /**
       * An object, the field 'object' contains object details.
       */
      OBJECT = 9;
    }
  
    /**
     * The type of value.
     * 
     * @note Booleans are encoded as either TRUE or FALSE to shorten the number
     * fields in use.
     */
    optional Type        type   = 1;
    /**
     * The numeric value, set if type = NUMBER.
     */
    optional double      number = 2;
    /**
     * The string, set if type = STRING.
     */
    optional string      str    = 3;
    /**
     * Object information, set if type = OBJECT.
     */
    optional ObjectValue object = 4;
  }

.. index:: Position

.. code-block:: c

  message Position
  {
    required uint32 scriptID   = 1;
    required uint32 lineNumber = 2;
  }



.. index:: OnHandleEvent

``OnHandleEvent``
-----------------

::

  event OnHandleEvent returns (DomEvent) = 20;

This event is issued for XML events on the host, if a corresponding
`AddEventHandler` has been issued earlier by the client.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message DomEvent
  {
    /**
     * Refers to the target of the event.
     */
    required uint32 objectID  = 1;
    required uint32 handlerID = 2;
    /**
     * The event type is e.g., `"click"`, `"mousemove"`
     * More examples are at http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
     * Exactly which events are implemented depends on the host, and is not defined in this protocol.
     */
    required string eventType = 3;
  }



.. index:: OnNewScript

``OnNewScript``
---------------

::

  event OnNewScript returns (ScriptInfo) = 16;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ScriptInfo
  {
    required uint32 runtimeID  = 1;
    required uint32 scriptID   = 2;
    /**
     * One of:
     * - `"inline"`
     * - `"event"`
     * - `"linked"`
     * - `"timeout"`
     * - `"java"`
     * - `"generated"`
     * - `"unknown"`
     * - `"debugger-eval"`
     */
    required string scriptType = 3;
    required string scriptData = 4;
    /**
     * present if `scriptType` is Linked
     */
    optional string uri        = 5;
  }



.. index:: OnObjectSelected

``OnObjectSelected``
--------------------

::

  event OnObjectSelected returns (ObjectSelection) = 21;

Some hosts send this event to indicate that an object was selected for
debugging, e.g., if the debugger was started by right-clicking an element
and clicking "inspect" in the context menu, this event will be sent
right after startup. A client may safely choose to ignore this event.


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ObjectSelection
  {
    required uint32 objectID  = 1;
    required uint32 windowID  = 2;
    optional uint32 runtimeID = 3;
  }



.. index:: OnParseError

``OnParseError``
----------------

::

  event OnParseError returns (DomParseError) = 28;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message DomParseError
  {
    required uint32 runtimeID   = 1;
    required uint32 scriptID    = 2;
    required uint32 lineNumber  = 3;
    /**
     * Represents the character offset in the script where the parse error occured.
     */
    required uint32 offset      = 4;
    /**
     * Describes in what context the error occured.
     */
    required string context     = 5;
    /**
     * Contains the human-readable description of the parse error.
     */
    required string description = 6;
  }



.. index:: OnReadyStateChanged

``OnReadyStateChanged``
-----------------------

::

  event OnReadyStateChanged returns (ReadyStateInfo) = 31;

Sent when the ready state of a document is changed. The possible states are:

  1. DOMContentLoaded: When the DOM (not inline elements) is loaded
  2. Loaded: After all onload-handlers have finished


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ReadyStateInfo
  {
    required uint32 runtimeID = 1;
    /**
     * 1 - DOMContentLoaded
     * 2 - Load
     */
    required uint32 state     = 2;
  }



.. index:: OnRuntimeStarted

``OnRuntimeStarted``
--------------------

::

  event OnRuntimeStarted returns (RuntimeInfo) = 14;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message RuntimeInfo
  {
    required uint32 runtimeID     = 1;
    required string htmlFramePath = 2;
    /**
     * The ID of the window this runtime is associated with, if the runtime is
     * associated with a single window. If the runtime is associated with more
     * (or less) than one window, the field will be set to zero. Refer to the
     * ``windowIDList`` field for more information.
     */
    required uint32 windowID      = 3;
    /**
     * the 'global' object
     */
    required uint32 objectID      = 4;
    /**
     * the document's URI
     */
    required string uri           = 5;
    /**
     * A short description of the nature of the runtime, for instance
     * "document", or "webworker".
     * 
     * @since 6.2
     */
    optional string description   = 6;
    /**
     * A list of all windows this runtime is associated with. Normally, this
     * will only contain one window, but some runtimes, for instance shared
     * WebWorkers, can be associated with multiple (zero or more) windows.
     * 
     * @since 6.2
     */
    repeated uint32 windowIDList  = 7;
  }



.. index:: OnRuntimeStopped

``OnRuntimeStopped``
--------------------

::

  event OnRuntimeStopped returns (RuntimeID) = 15;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message RuntimeID
  {
    required uint32 runtimeID = 1;
  }



.. index:: OnThreadFinished

``OnThreadFinished``
--------------------

::

  event OnThreadFinished returns (ThreadResult) = 18;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ThreadResult
  {
    required uint32 runtimeID = 1;
    required uint32 threadID  = 2;
    /**
     * One of:
     * - `"completed"`
     * - `"unhandled-exception"`
     * - `"aborted"`
     * - `"cancelled-by-scheduler"`
     */
    required string status    = 3;
  }



.. index:: OnThreadStarted

``OnThreadStarted``
-------------------

::

  event OnThreadStarted returns (ThreadInfo) = 17;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ThreadInfo
  {
    required uint32 runtimeID      = 1;
    required uint32 threadID       = 2;
    required uint32 parentThreadID = 3;
    /**
     * One of:
     * - `"inline"`
     * - `"event"`
     * - `"linked"`
     * - `"timeout"`
     * - `"java"`
     * - `"unknown"`
     */
    required string threadType     = 4;
    /**
     * present if `threadType` is `"event"`
     */
    optional string eventNamespace = 5;
    /**
     * present if `threadType` is `"event"`
     */
    optional string eventType      = 6;
  }



.. index:: OnThreadStoppedAt

``OnThreadStoppedAt``
---------------------

::

  event OnThreadStoppedAt returns (ThreadStopInfo) = 19;


message:

.. index:: SpotlightSelection

.. code-block:: c

  message ThreadStopInfo
  {
    required uint32 runtimeID      = 1;
    required uint32 threadID       = 2;
    required uint32 scriptID       = 3;
    required uint32 lineNumber     = 4;
    /**
     * One of:
     * - `"new script"`, when we're on the first statement of a new script.
     * - `"exception"`, when an exception occurred.
     * - `"error"`, when an error ocurred.
     * - `"abort"`, when the thread was aborted.
     * - `"gc"`, when garbage collection occurs.
     * - `"broken"`, when the `Break` command is used.
     * - `"debugger statement"`, when a debugger-statement is encountered.
     * - `"breakpoint"`, when a breakpoint is hit.
     * - `"step"`, when the 'ContinueThread' command is used.
     */
    required string stoppedReason  = 5;
    /**
     * Present if and only if `stoppedReason` is `"breakpoint"`
     */
    optional uint32 breakpointID   = 6;
    /**
     * If the stopped reason is "exception" or "error", this field will contain
     * the thrown value.
     * 
     * @since 6.8
     */
    optional Value  exceptionValue = 7;
  }

references:

.. index:: ObjectValue

.. code-block:: c

  message ObjectValue
  {
    required uint32 objectID     = 1;
    required bool   isCallable   = 2;
    /**
     * type, function or object
     */
    required string type         = 3;
    optional uint32 prototypeID  = 4;
    /**
     * The class of the object.
     */
    optional string className    = 5;
    /**
     * If the object is a function, this is the name of
     * the variable associated with that function (if any).
     */
    optional string functionName = 6;
  }

.. index:: Value

.. code-block:: c

  /**
   * Represents an ECMAScript value, a value is either one of the primitives
   * like string or boolean or an object.
   */
  message Value
  {
    enum Type
    {
      /**
       * The undefined type, returned when no value was found or "undefined"
       * was referenced.
       */
      UNDEFINED = 0;
      /**
       * A null value.
       */
      NULL = 1;
      /**
       * Boolean value true.
       */
      TRUE = 2;
      /**
       * Boolean value false.
       */
      FALSE = 3;
      /**
       * NaN value which cannot be exported to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("NaN")
       */
      NAN = 4;
      /**
       * Plus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("Infinity")
       */
      PLUS_INFINITY = 5;
      /**
       * Minus infinity value which cannot be export to JSON directly.
       * Should be treated like a number.
       * 
       * ECMAScript users should use this code to get the value natively::
       * 
       *   parseFloat("-Infinity")
       */
      MINUS_INFINITY = 6;
      /**
       * A number, use the field 'number' for the actual value.
       */
      NUMBER = 7;
      /**
       * A string, use the field 'str' for the actual string data.
       */
      STRING = 8;
      /**
       * An object, the field 'object' contains object details.
       */
      OBJECT = 9;
    }
  
    /**
     * The type of value.
     * 
     * @note Booleans are encoded as either TRUE or FALSE to shorten the number
     * fields in use.
     */
    optional Type        type   = 1;
    /**
     * The numeric value, set if type = NUMBER.
     */
    optional double      number = 2;
    /**
     * The string, set if type = STRING.
     */
    optional string      str    = 3;
    /**
     * Object information, set if type = OBJECT.
     */
    optional ObjectValue object = 4;
  }