Skip to main content

DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/NativeHost/
OpenDevTools.rs

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