diff --git a/.vscode/launch.json b/.vscode/launch.json index 411d7f5a1..d8262a14a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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"], diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a895b9fa6..3abda0a16 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -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"], diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index 51c8782e6..5b421c043 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -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();