diff --git a/src/core.ts b/src/core.ts index 75977d1..4a39f40 100644 --- a/src/core.ts +++ b/src/core.ts @@ -277,7 +277,9 @@ export abstract class MochaAdapterCore { const execArgv = [ ...config.nodeArgv ]; if (debug && !config.launcherScript) { - execArgv.push(`--inspect-brk=${config.debuggerPort}`); + config.launcherScript + ? config.env.MOCHA_WORKER_DEBUG = true + : execArgv.push(`--inspect-brk=${config.debuggerPort}`); } this.runningTestProcess = this.launchWorkerProcess(config, childProcScript, execArgv);