Skip to main content

agent_hub_runtime/commands/
developer_tools.rs

1//! Explicit access to the invoking window's local Web Inspector.
2
3/// Toggle the local inspector where supported; WebView2 only supports opening it.
4#[tauri::command]
5pub async fn toggle_developer_tools(window: tauri::Webview) {
6    #[cfg(not(target_os = "windows"))]
7    if window.is_devtools_open() {
8        window.close_devtools();
9        return;
10    }
11    window.open_devtools();
12}