debugger: add more logs to probe mode · nodejs/node@238b54e · GitHub
Skip to content

Commit 238b54e

Browse files
joyeecheungaduh95
authored andcommitted
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: #63663 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
1 parent f53dee5 commit 238b54e

24 files changed

Lines changed: 31 additions & 23 deletions

lib/internal/debugger/inspect_probe.js

Lines changed: 8 additions & 0 deletions

test/parallel/test-debugger-probe-bound-never-hit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spawnSyncAndAssert(process.execPath, [
1616
'--probe', 'probe-bound-never-hit.js:4',
1717
'--expr', '1',
1818
'probe-bound-never-hit.js',
19-
], { cwd }, {
19+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2020
stdout(output) {
2121
assertProbeJson(output, {
2222
v: 2,

test/parallel/test-debugger-probe-child-inspect-port-zero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spawnSyncAndAssert(process.execPath, [
1919
'--',
2020
'--inspect-port=0',
2121
'probe.js',
22-
], { cwd }, {
22+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2323
stdout(output) {
2424
assertProbeJson(output, {
2525
v: 2,

test/parallel/test-debugger-probe-explicit-column.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spawnSyncAndAssert(process.execPath, [
2424
'--probe', 'probe-multi-statement.js:5:29',
2525
'--expr', 'acc.length',
2626
'probe-multi-statement.js',
27-
], { cwd }, {
27+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2828
stdout(output) {
2929
assertProbeJson(output, {
3030
v: 2,

test/parallel/test-debugger-probe-expression-throws.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spawnSyncAndExit(process.execPath, [
2323
'--probe', `${fixture}:16`, '--expr', probes[0].expr,
2424
'--probe', `${fixture}:17`, '--expr', probes[1].expr,
2525
fixture,
26-
], { cwd }, {
26+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2727
status: 0,
2828
signal: null,
2929
stdout(output) {

test/parallel/test-debugger-probe-failure-hang-during-evaluate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spawnSyncAndExit(process.execPath, [
2424
'--probe', `${fixture}:10`, '--expr', probes[0].expr,
2525
'--probe', `${fixture}:11`, '--expr', probes[1].expr,
2626
fixture,
27-
], { cwd }, {
27+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2828
status: 1,
2929
signal: null,
3030
stdout(output) {

test/parallel/test-debugger-probe-failure-process-exit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spawnSyncAndExit(process.execPath, [
1818
'inspect', '--json',
1919
'--probe', `${fixture}:8`, '--expr', probes[0].expr,
2020
fixture,
21-
], { cwd }, {
21+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2222
status: 1,
2323
signal: null,
2424
stdout(output) {

test/parallel/test-debugger-probe-global-option-order.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spawnSyncAndAssert(process.execPath, [
1717
'--expr', 'finalValue',
1818
'--json',
1919
'probe.js',
20-
], { cwd }, {
20+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2121
stdout(output) {
2222
assertProbeJson(output, {
2323
v: 2,

test/parallel/test-debugger-probe-json-preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spawnSyncAndAssert(process.execPath, [
2424
'--probe', probeArg,
2525
'--expr', 'errorValue',
2626
'probe-types.js',
27-
], { cwd }, {
27+
], { cwd, env: { ...process.env, NODE_DEBUG: 'inspect_probe' } }, {
2828
stdout(output) {
2929
assertProbeJson(output, {
3030
v: 2,

test/parallel/test-debugger-probe-json-special-values.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)