diff --git a/client/src/utils/debug_logger.rs b/client/src/utils/debug_logger.rs index 6757f5b..5d96d18 100644 --- a/client/src/utils/debug_logger.rs +++ b/client/src/utils/debug_logger.rs @@ -33,8 +33,18 @@ impl io::Write for UiDebugWriter { let message = String::from_utf8_lossy(buf).trim().to_string(); let is_error = message.starts_with("ERROR"); - // Always keep in memory - buffer.push_back((message, is_error)); + // Keep in memory for UI + buffer.push_back((message.clone(), is_error)); + + // ALSO log directly to file (non-blocking best effort) + if let Ok(mut file) = OpenOptions::new() + .create(true) + .append(true) + .open("ui_debug.log") + { + let _ = writeln!(file, "{message}"); + } + Ok(buf.len()) }