Attach devtools to daemon when debug is enabled

This commit is contained in:
Héctor Ramón Jiménez 2025-04-08 13:44:00 +02:00
parent 97498aaddc
commit bc66866bb8
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -117,7 +117,13 @@ impl<P: Program> Daemon<P> {
where where
Self: 'static, Self: 'static,
{ {
Ok(shell::run(self.raw, self.settings, None)?) #[cfg(feature = "debug")]
let program = iced_devtools::attach(self.raw);
#[cfg(not(feature = "debug"))]
let program = self.raw;
Ok(shell::run(program, self.settings, None)?)
} }
/// Sets the [`Settings`] that will be used to run the [`Daemon`]. /// Sets the [`Settings`] that will be used to run the [`Daemon`].