Skip to content

Commit cfefe84

Browse files
committed
Allow --inspect=port in gulp runtests
Makes it possible to run two debuggers side-by-side.
1 parent dc1c45a commit cfefe84

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/build/options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const os = require("os");
44

55
/** @type {CommandLineOptions} */
66
module.exports = minimist(process.argv.slice(2), {
7-
boolean: ["debug", "dirty", "inspect", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"],
8-
string: ["browser", "tests", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
7+
boolean: ["debug", "dirty", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built"],
8+
string: ["browser", "tests", "inspect", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
99
alias: {
1010
"b": "browser",
1111
"d": "debug", "debug-brk": "debug",
@@ -49,7 +49,6 @@ if (module.exports.built) {
4949
* @typedef TypedOptions
5050
* @property {boolean} debug
5151
* @property {boolean} dirty
52-
* @property {boolean} inspect
5352
* @property {boolean} light
5453
* @property {boolean} colors
5554
* @property {boolean} lint
@@ -59,6 +58,7 @@ if (module.exports.built) {
5958
* @property {boolean} fix
6059
* @property {string} browser
6160
* @property {string} tests
61+
* @property {string} inspect
6262
* @property {string} runners
6363
* @property {string|number} workers
6464
* @property {string} host

scripts/build/tests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
8989
else {
9090
args.push("--no-colors");
9191
}
92-
if (inspect) {
93-
args.unshift("--inspect-brk");
92+
if (inspect !== undefined) {
93+
args.unshift(inspect == "" ? "--inspect-brk" : "--inspect-brk="+inspect);
9494
}
9595
else if (debug) {
9696
args.unshift("--debug-brk");

0 commit comments

Comments
 (0)