panicui provides a simple solution to easier debugging by utilizing user interface.
panicui allows you to create panic hooks that open a crash log window in just 7 lines of code.
Binary size of the program shown above (no strip, with debug symbols): ~1,010KB (0.98MB)
panicui only uses one direct dependency, fltk-rs.
panicui uses fltk for UI, which works across practically every platform. This includes:
More examples are available in the examples folder.
```rust
use panicui::app::PanicApplication; use panicui::style::Style; use panicui::window::PanicWindow; use std::backtrace::Backtrace; use std::panic; use std::panic::PanicInfo;
fn panichook(info: &PanicInfo) { let backtrace = Backtrace::forcecapture(); let crash_text = format!("{info}\n{backtrace}");
let win = PanicWindow::new(Style::default(), crash_text);
let mut app = PanicApplication::new(win);
app.run().expect("Unable to run application.");
}
fn main() { panic::sethook(Box::new(panichook));
// Cause some random panic.
Result::<(), _>::Err(5i32).unwrap();
} ```