summaryrefslogtreecommitdiff
path: root/doc/api/inspector.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-07-08 16:58:40 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-07-08 21:56:10 +0300
commitc18a9d1cb8fe94e39f2826de7edd9c44c9be9ce2 (patch)
treed5341f9dd8abda3ba2896f943192ba41102d6268 /doc/api/inspector.md
parent01eee530e3a8dc7cabdb5a6870ba6fe2367ec581 (diff)
downloadandroid-node-v8-c18a9d1cb8fe94e39f2826de7edd9c44c9be9ce2.tar.gz
android-node-v8-c18a9d1cb8fe94e39f2826de7edd9c44c9be9ce2.tar.bz2
android-node-v8-c18a9d1cb8fe94e39f2826de7edd9c44c9be9ce2.zip
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: https://github.com/nodejs/node/pull/21709 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Diffstat (limited to 'doc/api/inspector.md')
-rw-r--r--doc/api/inspector.md52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index 8ab827bd1f..92fcb0e03f 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -12,6 +12,21 @@ It can be accessed using:
const inspector = require('inspector');
```
+## inspector.close()
+
+Deactivate the inspector. Blocks until there are no active connections.
+
+## inspector.console
+
+* {Object} An object to send messages to the remote inspector console.
+
+```js
+require('inspector').console.log('a message');
+```
+
+The inspector console does not have API parity with Node.js
+console.
+
## inspector.open([port[, host[, wait]]])
* `port` {number} Port to listen on for inspector connections. Optional.
@@ -28,22 +43,7 @@ started.
If wait is `true`, will block until a client has connected to the inspect port
and flow control has been passed to the debugger client.
-### inspector.console
-
-An object to send messages to the remote inspector console.
-
-```js
-require('inspector').console.log('a message');
-```
-
-The inspector console does not have API parity with Node.js
-console.
-
-### inspector.close()
-
-Deactivate the inspector. Blocks until there are no active connections.
-
-### inspector.url()
+## inspector.url()
* Returns: {string|undefined}
@@ -112,6 +112,16 @@ Connects a session to the inspector back-end. An exception will be thrown
if there is already a connected session established either through the API or by
a front-end connected to the Inspector WebSocket port.
+### session.disconnect()
+<!-- YAML
+added: v8.0.0
+-->
+
+Immediately close the session. All pending message callbacks will be called
+with an error. [`session.connect()`] will need to be called to be able to send
+messages again. Reconnected session will lose all inspector state, such as
+enabled agents or configured breakpoints.
+
### session.post(method[, params][, callback])
<!-- YAML
added: v8.0.0
@@ -139,16 +149,6 @@ by V8. Chrome DevTools Protocol domain provides an interface for interacting
with one of the runtime agents used to inspect the application state and listen
to the run-time events.
-### session.disconnect()
-<!-- YAML
-added: v8.0.0
--->
-
-Immediately close the session. All pending message callbacks will be called
-with an error. [`session.connect()`] will need to be called to be able to send
-messages again. Reconnected session will lose all inspector state, such as
-enabled agents or configured breakpoints.
-
## Example usage
### CPU Profiler