mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
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>
35 lines
886 B
JavaScript
35 lines
886 B
JavaScript
// Tests that probing an unreachable line produces a `miss` with no hit events.
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const { spawnSyncAndAssert } = require('../common/child_process');
|
|
const { assertProbeJson } = require('../common/debugger-probe');
|
|
|
|
const cwd = fixtures.path('debugger');
|
|
|
|
spawnSyncAndAssert(process.execPath, [
|
|
'inspect',
|
|
'--json',
|
|
'--probe', 'probe-bound-never-hit.js:4',
|
|
'--expr', '1',
|
|
'probe-bound-never-hit.js',
|
|
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
|
|
stdout(output) {
|
|
assertProbeJson(output, {
|
|
v: 2,
|
|
probes: [{
|
|
expr: '1',
|
|
target: { suffix: 'probe-bound-never-hit.js', line: 4 },
|
|
}],
|
|
results: [{
|
|
event: 'miss',
|
|
pending: [0],
|
|
}],
|
|
});
|
|
},
|
|
trim: true,
|
|
});
|