Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: Remove support for --debug #12197

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions doc/api/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,27 +169,8 @@ breakpoint)

## Advanced Usage

### TCP-based protocol

> Stability: 0 - Deprecated: Use [V8 Inspector Integration][] instead.
The debug protocol used by the `--debug` flag was removed from V8.

An alternative way of enabling and accessing the debugger is to start
Node.js with the `--debug` command-line flag or by signaling an existing
Node.js process with `SIGUSR1`.

Once a process has been set in debug mode this way, it can be inspected
using the Node.js debugger by either connecting to the `pid` of the running
process or via URI reference to the listening debugger:

* `node debug -p <pid>` - Connects to the process via the `pid`
* `node debug <URI>` - Connects to the process via the URI such as
localhost:5858

### V8 Inspector Integration for Node.js

**NOTE: This is an experimental feature.**

V8 Inspector integration allows attaching Chrome DevTools to Node.js
instances for debugging and profiling. It uses the [Chrome Debugging Protocol][].

Expand Down
5 changes: 2 additions & 3 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1757,9 +1757,8 @@ cases:
source code internal in Node.js's bootstrapping process threw an error
when the bootstrapping function was called. This is extremely rare,
and generally can only happen during development of Node.js itself.
* `12` **Invalid Debug Argument** - The `--debug`, `--inspect` and/or
`--debug-brk` options were set, but the port number chosen was invalid
or unavailable.
* `12` **Invalid Debug Argument** - The `--inspect` and/or `--inspect-brk`
options were set, but the port number chosen was invalid or unavailable.
* `>128` **Signal Exits** - If Node.js receives a fatal signal such as
`SIGKILL` or `SIGHUP`, then its exit code will be `128` plus the
value of the signal code. This is a standard Unix practice, since
Expand Down
10 changes: 2 additions & 8 deletions src/node_debug_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,7 @@ bool DebugOptions::ParseOption(const std::string& option) {
argument = option.substr(pos + 1);
}

// --debug and --inspect are mutually exclusive
if (option_name == "--debug") {
debugger_enabled_ = true;
} else if (option_name == "--debug-brk") {
debugger_enabled_ = true;
wait_connect_ = true;
} else if (option_name == "--inspect") {
if (option_name == "--inspect") {
debugger_enabled_ = true;
enable_inspector = true;
} else if (option_name == "--inspect-brk") {
Expand All @@ -108,7 +102,7 @@ bool DebugOptions::ParseOption(const std::string& option) {
} else if ((option_name != "--debug-port" &&
option_name != "--inspect-port") ||
!has_argument) {
// only other valid possibility is --debug-port,
// only other valid possibility is --inspect-port,
// which requires an argument
return false;
}
Expand Down
42 changes: 0 additions & 42 deletions test/parallel/test-cluster-debug-port.js

This file was deleted.

99 changes: 0 additions & 99 deletions test/parallel/test-cluster-disconnect-handles.js

This file was deleted.

8 changes: 3 additions & 5 deletions test/parallel/test-cluster-inspector-debug-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ if (cluster.isMaster) {
fork(1);
fork(2, ['--inspect']);
fork(3, [`--inspect=${debuggerPort}`]);
fork(4, ['--inspect', '--debug']);
fork(5, [`--debug=${debuggerPort}`, '--inspect']);
fork(6, ['--inspect', `--debug-port=${debuggerPort}`]);
fork(7, [`--inspect-port=${debuggerPort}`]);
fork(8, ['--inspect', `--inspect-port=${debuggerPort}`]);
fork(4, ['--inspect', `--debug-port=${debuggerPort}`]);
fork(5, [`--inspect-port=${debuggerPort}`]);
fork(6, ['--inspect', `--inspect-port=${debuggerPort}`]);
} else {
const hasDebugArg = process.execArgv.some(function(arg) {
return /inspect/.test(arg);
Expand Down
13 changes: 0 additions & 13 deletions test/parallel/test-debug-brk-no-arg.js

This file was deleted.

70 changes: 0 additions & 70 deletions test/parallel/test-debug-brk.js

This file was deleted.

26 changes: 0 additions & 26 deletions test/parallel/test-debug-no-context.js

This file was deleted.

52 changes: 0 additions & 52 deletions test/parallel/test-debug-port-cluster.js

This file was deleted.

Loading