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