Skip to content

Commit 47f8f74

Browse files
Jan Kremstargos
Jan Krems
authored andcommitted
src: remove support for --debug
In the 2017-04-05 meeting, the CTC agreed to remove support for the legacy debugger in 8.0.0. This is the first step in this direction. Refs: nodejs/CTC#94 PR-URL: #12197 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent e139dae commit 47f8f74

16 files changed

+7
-608
lines changed

doc/api/debugger.md

-19
Original file line numberDiff line numberDiff line change
@@ -169,27 +169,8 @@ breakpoint)
169169

170170
## Advanced Usage
171171

172-
### TCP-based protocol
173-
174-
> Stability: 0 - Deprecated: Use [V8 Inspector Integration][] instead.
175-
The debug protocol used by the `--debug` flag was removed from V8.
176-
177-
An alternative way of enabling and accessing the debugger is to start
178-
Node.js with the `--debug` command-line flag or by signaling an existing
179-
Node.js process with `SIGUSR1`.
180-
181-
Once a process has been set in debug mode this way, it can be inspected
182-
using the Node.js debugger by either connecting to the `pid` of the running
183-
process or via URI reference to the listening debugger:
184-
185-
* `node debug -p <pid>` - Connects to the process via the `pid`
186-
* `node debug <URI>` - Connects to the process via the URI such as
187-
localhost:5858
188-
189172
### V8 Inspector Integration for Node.js
190173

191-
**NOTE: This is an experimental feature.**
192-
193174
V8 Inspector integration allows attaching Chrome DevTools to Node.js
194175
instances for debugging and profiling. It uses the [Chrome Debugging Protocol][].
195176

doc/api/process.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1757,9 +1757,8 @@ cases:
17571757
source code internal in Node.js's bootstrapping process threw an error
17581758
when the bootstrapping function was called. This is extremely rare,
17591759
and generally can only happen during development of Node.js itself.
1760-
* `12` **Invalid Debug Argument** - The `--debug`, `--inspect` and/or
1761-
`--debug-brk` options were set, but the port number chosen was invalid
1762-
or unavailable.
1760+
* `12` **Invalid Debug Argument** - The `--inspect` and/or `--inspect-brk`
1761+
options were set, but the port number chosen was invalid or unavailable.
17631762
* `>128` **Signal Exits** - If Node.js receives a fatal signal such as
17641763
`SIGKILL` or `SIGHUP`, then its exit code will be `128` plus the
17651764
value of the signal code. This is a standard Unix practice, since

src/node_debug_options.cc

+2-8
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,7 @@ bool DebugOptions::ParseOption(const std::string& option) {
9292
argument = option.substr(pos + 1);
9393
}
9494

95-
// --debug and --inspect are mutually exclusive
96-
if (option_name == "--debug") {
97-
debugger_enabled_ = true;
98-
} else if (option_name == "--debug-brk") {
99-
debugger_enabled_ = true;
100-
wait_connect_ = true;
101-
} else if (option_name == "--inspect") {
95+
if (option_name == "--inspect") {
10296
debugger_enabled_ = true;
10397
enable_inspector = true;
10498
} else if (option_name == "--inspect-brk") {
@@ -108,7 +102,7 @@ bool DebugOptions::ParseOption(const std::string& option) {
108102
} else if ((option_name != "--debug-port" &&
109103
option_name != "--inspect-port") ||
110104
!has_argument) {
111-
// only other valid possibility is --debug-port,
105+
// only other valid possibility is --inspect-port,
112106
// which requires an argument
113107
return false;
114108
}

test/parallel/test-cluster-debug-port.js

-42
This file was deleted.

test/parallel/test-cluster-inspector-debug-port.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ if (cluster.isMaster) {
2525
fork(1);
2626
fork(2, ['--inspect']);
2727
fork(3, [`--inspect=${debuggerPort}`]);
28-
fork(4, ['--inspect', '--debug']);
29-
fork(5, [`--debug=${debuggerPort}`, '--inspect']);
30-
fork(6, ['--inspect', `--debug-port=${debuggerPort}`]);
31-
fork(7, [`--inspect-port=${debuggerPort}`]);
32-
fork(8, ['--inspect', `--inspect-port=${debuggerPort}`]);
28+
fork(4, ['--inspect', `--debug-port=${debuggerPort}`]);
29+
fork(5, [`--inspect-port=${debuggerPort}`]);
30+
fork(6, ['--inspect', `--inspect-port=${debuggerPort}`]);
3331
} else {
3432
const hasDebugArg = process.execArgv.some(function(arg) {
3533
return /inspect/.test(arg);

test/parallel/test-debug-brk-no-arg.js

-13
This file was deleted.

test/parallel/test-debug-brk.js

-70
This file was deleted.

test/parallel/test-debug-no-context.js

-26
This file was deleted.

test/parallel/test-debug-port-cluster.js

-52
This file was deleted.

test/parallel/test-debug-port-from-cmdline.js

-63
This file was deleted.

0 commit comments

Comments
 (0)