Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
OpenDevTools.rs

1//! `nativeHost:openDevTools` - open the WebKit inspector for the main window.
2//! Requires the `devtools` Tauri feature (already enabled in the debug profile
3//! via `TAURI_DEV_TOOLS` env or cargo feature flag).
4
5use serde_json::Value;
6use tauri::{AppHandle, Manager};
7
8use crate::dev_log;
9
10pub async fn Fn(ApplicationHandle:AppHandle, _Arguments:Vec<Value>) -> Result<Value, String> {
11	dev_log!("devtools", "nativeHost:openDevTools");
12
13	if let Some(Window) = ApplicationHandle.get_webview_window("main") {
14		Window.open_devtools();
15	}
16
17	Ok(Value::Null)
18}