@@ -12,6 +12,21 @@ It can be accessed using:
12
12
const inspector = require (' inspector' );
13
13
```
14
14
15
+ ## inspector.close()
16
+
17
+ Deactivate the inspector. Blocks until there are no active connections.
18
+
19
+ ## inspector.console
20
+
21
+ * {Object} An object to send messages to the remote inspector console.
22
+
23
+ ``` js
24
+ require (' inspector' ).console .log (' a message' );
25
+ ```
26
+
27
+ The inspector console does not have API parity with Node.js
28
+ console.
29
+
15
30
## inspector.open([ port[ , host[ , wait]]] )
16
31
17
32
* ` port ` {number} Port to listen on for inspector connections. Optional.
@@ -28,22 +43,7 @@ started.
28
43
If wait is ` true ` , will block until a client has connected to the inspect port
29
44
and flow control has been passed to the debugger client.
30
45
31
- ### inspector.console
32
-
33
- An object to send messages to the remote inspector console.
34
-
35
- ``` js
36
- require (' inspector' ).console .log (' a message' );
37
- ```
38
-
39
- The inspector console does not have API parity with Node.js
40
- console.
41
-
42
- ### inspector.close()
43
-
44
- Deactivate the inspector. Blocks until there are no active connections.
45
-
46
- ### inspector.url()
46
+ ## inspector.url()
47
47
48
48
* Returns: {string|undefined}
49
49
@@ -112,6 +112,16 @@ Connects a session to the inspector back-end. An exception will be thrown
112
112
if there is already a connected session established either through the API or by
113
113
a front-end connected to the Inspector WebSocket port.
114
114
115
+ ### session.disconnect()
116
+ <!-- YAML
117
+ added: v8.0.0
118
+ -->
119
+
120
+ Immediately close the session. All pending message callbacks will be called
121
+ with an error. [ ` session.connect() ` ] will need to be called to be able to send
122
+ messages again. Reconnected session will lose all inspector state, such as
123
+ enabled agents or configured breakpoints.
124
+
115
125
### session.post(method[ , params] [ , callback ] )
116
126
<!-- YAML
117
127
added: v8.0.0
@@ -139,16 +149,6 @@ by V8. Chrome DevTools Protocol domain provides an interface for interacting
139
149
with one of the runtime agents used to inspect the application state and listen
140
150
to the run-time events.
141
151
142
- ### session.disconnect()
143
- <!-- YAML
144
- added: v8.0.0
145
- -->
146
-
147
- Immediately close the session. All pending message callbacks will be called
148
- with an error. [ ` session.connect() ` ] will need to be called to be able to send
149
- messages again. Reconnected session will lose all inspector state, such as
150
- enabled agents or configured breakpoints.
151
-
152
152
## Example usage
153
153
154
154
### CPU Profiler
0 commit comments