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>
26 lines
818 B
JavaScript
26 lines
818 B
JavaScript
// This tests debugger probe text output for a single hit.
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
const { spawnSyncAndAssert } = require('../common/child_process');
|
|
const { assertProbeText } = require('../common/debugger-probe');
|
|
const cwd = fixtures.path('debugger');
|
|
const probeUrl = fixtures.fileURL('debugger', 'probe.js').href;
|
|
|
|
spawnSyncAndAssert(process.execPath, [
|
|
'inspect',
|
|
'--probe', 'probe.js:12',
|
|
'--expr', 'finalValue',
|
|
'probe.js',
|
|
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
|
|
stdout(output) {
|
|
assertProbeText(output,
|
|
`Hit 1 at ${probeUrl}:12:1\n` +
|
|
' finalValue = 81\n' +
|
|
'Completed');
|
|
},
|
|
trim: true,
|
|
});
|