add more logging to desktop hot reloading

This commit is contained in:
Evan Almloff committed 2023-11-20 09:47:03 -06:00
1 parent 0ee21dff1e
commit 8cf8f66c27
1 file changed
+3
+3
View File
@@ -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))