From 671f5aa8aad95ea88101f52073a21a10700552b9 Mon Sep 17 00:00:00 2001 From: Flavio Fois Date: Thu, 5 Feb 2026 12:39:28 +0100 Subject: [PATCH] feat: fix debugger protection trigger on dev builds --- frontend/src/routes/(app)/+layout.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/(app)/+layout.svelte b/frontend/src/routes/(app)/+layout.svelte index bc649af..84c8c11 100644 --- a/frontend/src/routes/(app)/+layout.svelte +++ b/frontend/src/routes/(app)/+layout.svelte @@ -31,10 +31,12 @@ } from "$lib/wailsjs/runtime/runtime"; import { RefreshCcwDot } from "@lucide/svelte"; import { IsDebuggerRunning, QuitApp } from "$lib/wailsjs/go/main/App"; + import { settingsStore } from "$lib/stores/settings.svelte.js"; let versionInfo: utils.Config | null = $state(null); let isMaximized = $state(false); let isDebugerOn: boolean = $state(false); + let isDebbugerProtectionOn: boolean = $state(true); async function syncMaxState() { isMaximized = await WindowIsMaximised(); @@ -69,7 +71,7 @@ } onMount(async () => { - if (browser) { + if (browser && isDebbugerProtectionOn) { detectDebugging(); setInterval(detectDebugging, 1000); } @@ -118,6 +120,8 @@ } catch { stored = null; } + isDebbugerProtectionOn = settingsStore.settings.enableAttachedDebuggerProtection ? true : false; + $inspect(isDebbugerProtectionOn, "isDebbugerProtectionOn"); applyTheme(stored === "light" ? "light" : "dark"); });