Skip to content

Commit 699b31f

Browse files
TrottBridgeAR
authored andcommitted
doc,inspector: use code markup/markdown in headers
PR-URL: #31086 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 3571df3 commit 699b31f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

doc/api/inspector.md

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

15-
## inspector.close()
15+
## `inspector.close()`
1616

1717
Deactivate the inspector. Blocks until there are no active connections.
1818

19-
## inspector.console
19+
## `inspector.console`
2020

2121
* {Object} An object to send messages to the remote inspector console.
2222

@@ -27,7 +27,7 @@ require('inspector').console.log('a message');
2727
The inspector console does not have API parity with Node.js
2828
console.
2929

30-
## inspector.open(\[port\[, host\[, wait\]\]\])
30+
## `inspector.open([port[, host[, wait]]])`
3131

3232
* `port` {number} Port to listen on for inspector connections. Optional.
3333
**Default:** what was specified on the CLI.
@@ -46,7 +46,7 @@ and flow control has been passed to the debugger client.
4646
See the [security warning](cli.html#inspector_security) regarding the `host`
4747
parameter usage.
4848

49-
## inspector.url()
49+
## `inspector.url()`
5050

5151
* Returns: {string|undefined}
5252

@@ -67,7 +67,7 @@ $ node -p 'inspector.url()'
6767
undefined
6868
```
6969

70-
## inspector.waitForDebugger()
70+
## `inspector.waitForDebugger()`
7171
<!-- YAML
7272
added: v12.7.0
7373
-->
@@ -77,14 +77,14 @@ Blocks until a client (existing or connected later) has sent
7777

7878
An exception will be thrown if there is no active inspector.
7979

80-
## Class: inspector.Session
80+
## Class: `inspector.Session`
8181

8282
* Extends: {EventEmitter}
8383

8484
The `inspector.Session` is used for dispatching messages to the V8 inspector
8585
back-end and receiving message responses and notifications.
8686

87-
### Constructor: new inspector.Session()
87+
### Constructor: `new inspector.Session()`
8888
<!-- YAML
8989
added: v8.0.0
9090
-->
@@ -93,7 +93,7 @@ Create a new instance of the `inspector.Session` class. The inspector session
9393
needs to be connected through [`session.connect()`][] before the messages
9494
can be dispatched to the inspector backend.
9595

96-
### Event: 'inspectorNotification'
96+
### Event: `'inspectorNotification'`
9797
<!-- YAML
9898
added: v8.0.0
9999
-->
@@ -110,7 +110,7 @@ session.on('inspectorNotification', (message) => console.log(message.method));
110110

111111
It is also possible to subscribe only to notifications with specific method:
112112

113-
### Event: &lt;inspector-protocol-method&gt;
113+
### Event: `<inspector-protocol-method>`;
114114
<!-- YAML
115115
added: v8.0.0
116116
-->
@@ -131,22 +131,22 @@ session.on('Debugger.paused', ({ params }) => {
131131
// [ '/the/file/that/has/the/breakpoint.js:11:0' ]
132132
```
133133

134-
### session.connect()
134+
### `session.connect()`
135135
<!-- YAML
136136
added: v8.0.0
137137
-->
138138

139139
Connects a session to the inspector back-end.
140140

141-
### session.connectToMainThread()
141+
### `session.connectToMainThread()`
142142
<!-- YAML
143143
added: v12.11.0
144144
-->
145145

146146
Connects a session to the main thread inspector back-end. An exception will
147147
be thrown if this API was not called on a Worker thread.
148148

149-
### session.disconnect()
149+
### `session.disconnect()`
150150
<!-- YAML
151151
added: v8.0.0
152152
-->
@@ -156,7 +156,7 @@ with an error. [`session.connect()`][] will need to be called to be able to send
156156
messages again. Reconnected session will lose all inspector state, such as
157157
enabled agents or configured breakpoints.
158158

159-
### session.post(method\[, params\]\[, callback\])
159+
### `session.post(method[, params][, callback])`
160160
<!-- YAML
161161
added: v8.0.0
162162
-->

0 commit comments

Comments
 (0)