node/test/sequential/test-debugger-debug-brk.js
Joyee Cheung fa5e097530
process: move DEP0062 (node --debug) to end-of-life
This has already been practically end-of-life since `node --debug`
alone would exit the process. This patch drops support of
`node --inspect --debug-brk` as well.

`node --inspect --debug-brk` has been deprecated since v8,
it has been maintained so that vendors can target Node.js
v6 and above without detecting versions.
The support of `--inspect`, which starts from v6, will reach
end-of-life in April 2019, it should be safe to drop the support
of `--inspect --debug-brk` altogether in v12.

Also removes `process._deprecatedDebugBrk`

PR-URL: https://github.com/nodejs/node/pull/25828
Refs: https://github.com/nodejs/node/pull/12949
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-02-02 05:45:05 +08:00

22 lines
666 B
JavaScript

'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
// This test ensures that the --debug-brk flag will exit the process
const assert = require('assert');
const fixtures = require('../common/fixtures');
const { spawnSync } = require('child_process');
// File name here doesn't actually matter the process will exit on start.
const script = fixtures.path('empty.js');
function test(arg) {
const child = spawnSync(process.execPath, ['--inspect', arg, script]);
const stderr = child.stderr.toString();
assert(stderr.includes('DEP0062'));
assert.strictEqual(child.status, 9);
}
test('--debug-brk');
test('--debug-brk=5959');