From 8ec755792663758482652de2a7cbef9a0500e903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=A4mmlein?= Date: Tue, 17 Dec 2024 14:50:17 +0100 Subject: [PATCH] Fix Enable contiue command if the debbuger is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Lämmlein --- .../browser/debug-frontend-application-contribution.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/debug/src/browser/debug-frontend-application-contribution.ts b/packages/debug/src/browser/debug-frontend-application-contribution.ts index 62a58db074a0e..7ba6879db23ce 100644 --- a/packages/debug/src/browser/debug-frontend-application-contribution.ts +++ b/packages/debug/src/browser/debug-frontend-application-contribution.ts @@ -666,8 +666,14 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi isEnabled: () => this.manager.state === DebugState.Stopped }); registry.registerCommand(DebugCommands.CONTINUE, { - execute: () => this.manager.currentThread && this.manager.currentThread.continue(), - isEnabled: () => this.manager.state === DebugState.Stopped + execute: () => { + if (this.manager.state === DebugState.Stopped) { + // eslint-disable-next-line no-unused-expressions + this.manager.currentThread && this.manager.currentThread.continue(); + } + }, + // When there is a debug session, F5 should always be captured by this command + isEnabled: () => this.manager.state !== DebugState.Inactive }); registry.registerCommand(DebugCommands.PAUSE, { execute: () => this.manager.currentThread && this.manager.currentThread.pause(),