Skip to content

feat(settings): add a remembered developer mode switch - #79

Merged
DimoADE merged 1 commit into
DimoADE:masterfrom
Savlgoodman:feat/developer-mode
Nov 18, 2026
Merged

DimoADE merged 1 commit into
DimoADE:masterfrom
Savlgoodman:feat/developer-mode

Conversation

@Savlgoodman

Copy link
Copy Markdown
Contributor

Settings → System
开发者模式 # settings.json system.developer_mode, default false
on
F12 / Ctrl+Shift+I / Option+Command+I
打开开发者工具
off
swallow those shortcuts
AreDevToolsEnabled = false

set_developer_mode
merge system.developer_mode into local settings.json
apply to desktop webviews
Windows: AcceleratorKeyPressed owns F12 and Ctrl+Shift+I
macOS / Linux: page shortcut calls open_developer_tools
settings.json change
settings watcher reloads the same flag

正式版不打开 Tauri 的 devtools feature。浏览器插件的「检查」仍只作用于网页标签。开关写在本机 settings.json,不跟随远程 Host。

Evidence

• Before: 正式版 WebView 创建时 AreDevToolsEnabled 为 false,F12 无响应。打开开关后,WebView2 会记住自己的 F12;关掉开关再按,检查器仍会打开。
After: cargo test -p vibex windows_f12_opens_only 通过:开关打开时 F12 / Ctrl+Shift+I 为 Open,关闭时为 Swallow。cargo test -p vibex --test release_devtools 通过,发布清单仍不含 tauri/devtools。frontend 的 SystemSettings.test.tsx 通过,开关在「设置 → 系统」最底部,打开后出现「打开开发者工具」。本机安装包上确认过:打开开关后 F12 可以打开检查器。

Merge Danger

Door: two-way

默认关闭。旧的 settings.json 没有该字段时按关闭处理。回滚这个提交不会改已有配置的其它字段。

Blast Radius: desktop

只影响本机桌面窗口的检查器快捷键。WebUI 不显示这个开关。browser-* 网页标签不走这条路径。

Release builds can open the inspector from Settings, System without enabling
the tauri/devtools feature. The switch is stored in the local settings.json
system section and applies to the desktop webviews. Closing it swallows F12
and Ctrl+Shift+I so WebView2 does not keep its own shortcut armed.
@DimoADE
DimoADE merged commit 1e9600b into DimoADE:master Nov 18, 2026
0 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants