node/test/parallel/test-debugger-probe-missing-expr.js
Joyee Cheung f30139e3b9
debugger: add more logs to probe mode
Add more log points in the probe mode and enable the debuglog
int the probe mode tests.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63663
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2026-06-01 20:36:47 +00:00

21 lines
588 B
JavaScript

// This tests that probe mode rejects a --probe without a matching --expr.
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const fixtures = require('../common/fixtures');
const { spawnSyncAndExit } = require('../common/child_process');
const cwd = fixtures.path('debugger');
spawnSyncAndExit(process.execPath, [
'inspect',
'--probe', 'probe.js:12',
'probe.js',
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
signal: null,
status: 9,
stderr: /Each --probe must be followed immediately by --expr/,
trim: true,
});