From bc66866bb81d0d477c7d0dd96cd54d1d7b443801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Tue, 8 Apr 2025 13:44:00 +0200 Subject: [PATCH] Attach `devtools` to `daemon` when `debug` is enabled --- src/daemon.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/daemon.rs b/src/daemon.rs index 384e7582..08a8cf59 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -117,7 +117,13 @@ impl Daemon

{ where 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`].