From 2bd890fc597530f7dd5237d729fcc4a96807d08d Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 12 Jan 2020 15:06:59 +0100 Subject: [PATCH] Disable timeouts in debug mode Fixes #2355. --- lib/api.js | 2 +- lib/cli.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/api.js b/lib/api.js index 95565f8aa..bf4c9965b 100644 --- a/lib/api.js +++ b/lib/api.js @@ -69,7 +69,7 @@ class Api extends Emittery { const pendingWorkers = new Set(); const timedOutWorkerFiles = new Set(); let restartTimer; - if (apiOptions.timeout) { + if (apiOptions.timeout && !apiOptions.debug) { const timeout = ms(apiOptions.timeout); restartTimer = debounce(() => { diff --git a/lib/cli.js b/lib/cli.js index 05e231e9d..fac922fc6 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -219,6 +219,10 @@ exports.run = async () => { // eslint-disable-line complexity if (isCi) { exit('Debugging is not available in CI.'); } + + if (combined.timeout) { + console.log(chalk.magenta(` ${figures.warning} The timeout option has been disabled to help with debugging.`)); + } } if (Reflect.has(combined, 'concurrency') && (!Number.isInteger(combined.concurrency) || combined.concurrency < 0)) {