desktop/devtools: habilitar F12/Ctrl+Shift+I e menu de contexto para abrir DevTools
- src-tauri: adiciona comando open_devtools que chama window.open_devtools() - frontend: listeners para F12/Ctrl+Shift+I e botão direito com Ctrl/Shift Facilita depuração de UI no executável Tauri.
This commit is contained in:
parent
087170e321
commit
0b39bcb56c
2 changed files with 31 additions and 1 deletions
|
|
@ -32,6 +32,12 @@ fn stop_machine_agent(state: tauri::State<AgentRuntime>) -> Result<(), String> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn open_devtools(window: tauri::WebviewWindow) -> Result<(), String> {
|
||||
window.open_devtools();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
|
|
@ -44,7 +50,8 @@ pub fn run() {
|
|||
collect_machine_profile,
|
||||
collect_machine_inventory,
|
||||
start_machine_agent,
|
||||
stop_machine_agent
|
||||
stop_machine_agent,
|
||||
open_devtools
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue