Skip to content

Commit ac4e312

Browse files
feat: make ap launch also open Wenkit devtools in debug mode
1 parent e33ba79 commit ac4e312

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/app/src-tauri/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ pub fn run() {
3232
.build(),
3333
)?;
3434
}
35+
#[cfg(debug_assertions)] // only include this code on debug builds
36+
{
37+
use tauri::Manager;
38+
let window = app.get_webview_window("main").unwrap();
39+
window.open_devtools();
40+
window.close_devtools();
41+
}
42+
3543
Ok(())
3644
})
3745
.run(tauri::generate_context!())

0 commit comments

Comments
 (0)