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

test_runner: support using --inspect with --test #44520

Merged
merged 15 commits into from
Sep 10, 2022
Prev Previous commit
Next Next commit
try debugging this
  • Loading branch information
MoLow committed Sep 8, 2022
commit e1375278e2de9a5f05a8f95624d798b9794935b4
2 changes: 2 additions & 0 deletions lib/internal/test_runner/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ function filterExecArgv(arg) {

function getRunArgs({ path, inspectPort }) {
const argv = ArrayPrototypeFilter(process.execArgv, filterExecArgv);
console.log(`Running test ${path}...`, { inspectPort, isUsingInspector: isUsingInspector() });
if (isUsingInspector()) {
ArrayPrototypePush(argv, `--inspect-port=${getInspectPort(inspectPort)}`);
}
console.log(`Running test ${path}...`, { inspectPort, argv });
ArrayPrototypePush(argv, path);
return argv;
}
Expand Down