Skip to content

Commit 506631a

Browse files
vsemozhetbyttargos
authored andcommitted
doc: fix structure and formatting in inspector.md
1. Reorder some sections alphabetically. 2. Fix some heading levels. 3. Express a type of a property more formally. PR-URL: #21709 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Claudio Rodriguez <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
1 parent 2922028 commit 506631a

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

doc/api/inspector.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ It can be accessed using:
1212
const inspector = require('inspector');
1313
```
1414

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+
1530
## inspector.open([port[, host[, wait]]])
1631

1732
* `port` {number} Port to listen on for inspector connections. Optional.
@@ -28,22 +43,7 @@ started.
2843
If wait is `true`, will block until a client has connected to the inspect port
2944
and flow control has been passed to the debugger client.
3045

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()
4747

4848
* Returns: {string|undefined}
4949

@@ -112,6 +112,16 @@ Connects a session to the inspector back-end. An exception will be thrown
112112
if there is already a connected session established either through the API or by
113113
a front-end connected to the Inspector WebSocket port.
114114

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+
115125
### session.post(method[, params][, callback])
116126
<!-- YAML
117127
added: v8.0.0
@@ -139,16 +149,6 @@ by V8. Chrome DevTools Protocol domain provides an interface for interacting
139149
with one of the runtime agents used to inspect the application state and listen
140150
to the run-time events.
141151

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-
152152
## Example usage
153153

154154
### CPU Profiler

0 commit comments

Comments
 (0)