This repository was archived by the owner on Jul 31, 2018. It is now read-only.
File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ | Title | ` node inspect ` CLI debugger |
2
+ | --------| -----------------------------|
3
+ | Author | @jkrems |
4
+ | Status | DRAFT |
5
+ | Date | 2016-09-04 |
6
+
7
+ ## Description
8
+
9
+ For the old V8 debugger protocol,
10
+ node offers two ways to use it:
11
+
12
+ 1 . ` node --debug <file> ` : Start ` file ` with remote debugging enabled.
13
+ 2 . ` node debug <file> ` : Start an interactive CLI debugger for ` <file> ` .
14
+
15
+ But for the Chrome inspector protol,
16
+ there's only ` --inspect ` which is roughly equivalent to the ` --debug ` flag.
17
+ It's impossible to use the new protocol without an external tool.
18
+
19
+ This proposes the addition of the following commands to node:
20
+
21
+ ```
22
+ node inspect script.js # Start interactive debug session for script.js
23
+ node inspect <host>:<port> # Connect to inspector protocol on host:port
24
+ ```
25
+
26
+ ` node inspect -p <pid> ` would be a lot harder to implement than the others.
27
+ So while it might be very useful long-term,
28
+ this proposal explicitly does not include that variant.
29
+
30
+ The debug repl should offer the same methods & similar output to the
31
+ [ current debugger] ( https://nodejs.org/api/debugger.html ) .
32
+
33
+ ## Alternatives
34
+
35
+ * Offer a blessed, stand-alone ` node-inspect ` tool installed via npm.
36
+ * The methods & output could follow ` gdb ` 's example.
37
+ * The methods & output could follow ` lldb ` 's example.
You can’t perform that action at this time.
0 commit comments