Repository navigation
feat(settings): add a remembered developer mode switch - #79
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-* 网页标签不走这条路径。