Enabling frontend dev tools (#1420)

This commit is contained in:
Ericson "Fogo" Soares 2023-10-03 00:54:46 -03:00 committed by GitHub
parent 15a748d3f9
commit 4e0dd5fe0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

3
.vscode/launch.json vendored
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"],

3
.vscode/tasks.json vendored
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"],

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();