From 2fae1b4c0ea96bf005d23d567b688260764ba671 Mon Sep 17 00:00:00 2001 From: Psychotoxical <171614930+Psychotoxical@users.noreply.github.com> Date: Sat, 25 Apr 2026 22:17:16 +0200 Subject: [PATCH] chore(tauri): don't auto-open devtools on launch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the #[cfg(debug_assertions)] open_devtools() block from setup(). DevTools remain available in dev builds via the standard WebKit shortcut (Ctrl+Shift+I) and right-click → Inspect, but no longer pop up automatically on every dev launch. Less visual clutter when iterating without needing the inspector. Production behaviour is unchanged — devtools stay hard-stripped from release builds via Tauri's default `windows[].devtools=false` for release. Co-Authored-By: Claude Opus 4.7 (1M context) --- src-tauri/src/lib.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 1f586d83..a6cc1202 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -3621,14 +3621,6 @@ pub fn run() { } } - #[cfg(debug_assertions)] - { - use tauri::Manager; - if let Some(win) = app.get_webview_window("main") { - win.open_devtools(); - } - } - // ── System tray ─────────────────────────────────────────────── // Always build on startup when possible; the frontend calls toggle_tray_icon(false) // immediately after load if the user has disabled the tray icon.