1
0
Эх сурвалжийг харах

add more logging to desktop hot reloading

Evan Almloff 1 жил өмнө
parent
commit
8cf8f66c27

+ 3 - 0
packages/cli/src/server/desktop/mod.rs

@@ -73,6 +73,7 @@ pub async fn serve(config: CrateConfig, hot_reload_state: Option<HotReloadState>
 
             move || {
                 let mut current_child = currently_running_child.write().unwrap();
+                log::trace!("Killing old process");
                 current_child.kill()?;
                 let (child, result) = start_desktop(&config)?;
                 *current_child = child;
@@ -212,6 +213,7 @@ fn send_msg(msg: HotReloadMsg, channel: &mut impl std::io::Write) -> bool {
 
 pub fn start_desktop(config: &CrateConfig) -> Result<(Child, BuildResult)> {
     // Run the desktop application
+    log::trace!("Building application");
     let result = crate::builder::build_desktop(config, true)?;
 
     match &config.executable {
@@ -222,6 +224,7 @@ pub fn start_desktop(config: &CrateConfig) -> Result<(Child, BuildResult)> {
             if cfg!(windows) {
                 file.set_extension("exe");
             }
+            log::trace!("Running application from {:?}", file);
             let child = Command::new(file.to_str().unwrap()).spawn()?;
 
             Ok((child, result))