diff --git a/lib/internal/debugger/inspect_client.js b/lib/internal/debugger/inspect_client.js index 5bd73d250c2ead..f170b91427797f 100644 --- a/lib/internal/debugger/inspect_client.js +++ b/lib/internal/debugger/inspect_client.js @@ -193,7 +193,17 @@ class Client extends EventEmitter { if (payloadBuffer === null || payloadBuffer.length === 0) break; const payloadStr = payloadBuffer.toString(); - debuglog('< %s', payloadStr); + if (payloadStr.startsWith('{"method":"Debugger.scriptParsed"')) { + // Do not log Debugger.scriptParsed events because the payloads + // can be huge. + debuglog('< Debugger.scriptParsed ...'); + } else if (payloadStr.startsWith('{"method":"Debugger.paused"')) { + // Do not log Debugger.paused events because the payloads + // can be huge. + debuglog('< Debugger.paused ...'); + } else { + debuglog('< %s', payloadStr); + } const lastChar = payloadStr[payloadStr.length - 1]; if (payloadStr[0] !== '{' || lastChar !== '}') { throw new ERR_DEBUGGER_ERROR(`Payload does not look like JSON: ${payloadStr}`); diff --git a/test/common/debugger.js b/test/common/debugger.js index d2ac4f3b6c5fbf..0a7c1e87a73124 100644 --- a/test/common/debugger.js +++ b/test/common/debugger.js @@ -7,7 +7,10 @@ const BREAK_MESSAGE = new RegExp('(?:' + [ 'exception', 'other', 'promiseRejection', ].join('|') + ') in', 'i'); -const TIMEOUT = common.platformTimeout(5000); +let TIMEOUT = common.platformTimeout(5000); +if (common.isWindows) { + TIMEOUT = common.platformTimeout(15000); +} function isPreBreak(output) { return /Break on start/.test(output) && /1 \(function \(exports/.test(output); diff --git a/test/sequential/test-debugger-breakpoint-exists.js b/test/sequential/test-debugger-breakpoint-exists.js index 7be0ba657fa981..47fc3c3ceec43a 100644 --- a/test/sequential/test-debugger-breakpoint-exists.js +++ b/test/sequential/test-debugger-breakpoint-exists.js @@ -7,6 +7,7 @@ common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); const startCLI = require('../common/debugger'); +process.env.NODE_DEBUG = 'inspect'; // Test for "Breakpoint at specified location already exists" error. { const script = fixtures.path('debugger', 'three-lines.js'); diff --git a/test/sequential/test-debugger-help.js b/test/sequential/test-debugger-help.js index e24f873212b589..a1948d5ba887da 100644 --- a/test/sequential/test-debugger-help.js +++ b/test/sequential/test-debugger-help.js @@ -7,6 +7,7 @@ const fixtures = require('../common/fixtures'); const startCLI = require('../common/debugger'); const assert = require('assert'); +process.env.NODE_DEBUG = 'inspect'; { const cli = startCLI([fixtures.path('debugger/empty.js')]); diff --git a/test/sequential/test-debugger-list.js b/test/sequential/test-debugger-list.js index 594874e140b306..f95beb4f32df48 100644 --- a/test/sequential/test-debugger-list.js +++ b/test/sequential/test-debugger-list.js @@ -8,6 +8,7 @@ const startCLI = require('../common/debugger'); const assert = require('assert'); +process.env.NODE_DEBUG = 'inspect'; const cli = startCLI([fixtures.path('debugger/three-lines.js')]); (async () => { diff --git a/test/sequential/test-debugger-low-level.js b/test/sequential/test-debugger-low-level.js index f6d97f2dfe153d..5558dccd5313b9 100644 --- a/test/sequential/test-debugger-low-level.js +++ b/test/sequential/test-debugger-low-level.js @@ -6,6 +6,7 @@ common.skipIfInspectorDisabled(); const fixtures = require('../common/fixtures'); const startCLI = require('../common/debugger'); const assert = require('assert'); +process.env.NODE_DEBUG = 'inspect'; // Debugger agent direct access. { diff --git a/test/sequential/test-debugger-random-port.js b/test/sequential/test-debugger-random-port.js index da8656cf1c7115..189d5052eb97bd 100644 --- a/test/sequential/test-debugger-random-port.js +++ b/test/sequential/test-debugger-random-port.js @@ -8,6 +8,7 @@ const startCLI = require('../common/debugger'); const assert = require('assert'); +process.env.NODE_DEBUG = 'inspect'; // Random port. { const script = fixtures.path('debugger', 'three-lines.js');