Enabling frontend dev tools (#1420)

This commit is contained in:
Ericson "Fogo" Soares authored and GitHub committed 2023-10-03 03:54:46 +00:00
1 parent 15a748d3f9
commit 4e0dd5fe0b
3 files changed
+11 -2

No files matched your search

+2 -1
View File
@@ -17,7 +17,8 @@
"problemMatcher": "$rustc"
},
"env": {
"RUST_BACKTRACE": "short"
"RUST_BACKTRACE": "short",
"SD_DEVTOOLS": "true"
// "RUST_LOG": "sd_core::invalidate-query=trace"
},
"sourceLanguages": ["rust"],
+2 -1
View File
@@ -52,7 +52,8 @@
"--no-default-features"
],
"env": {
"RUST_BACKTRACE": "short"
"RUST_BACKTRACE": "short",
"SD_DEVTOOLS": "true"
// "RUST_LOG": "sd_core::invalidate-query=trace"
},
"problemMatcher": ["$rustc"],
+7
View File
@@ -155,6 +155,13 @@ async fn main() -> tauri::Result<()> {
}
});
#[cfg(debug_assertions)]
{
if std::env::var("SD_DEVTOOLS").is_ok() {
window.open_devtools();
}
}
#[cfg(target_os = "windows")]
window.set_decorations(true).unwrap();