Attach devtools to daemon when debug is enabled
This commit is contained in:
parent
97498aaddc
commit
bc66866bb8
1 changed files with 7 additions and 1 deletions
|
|
@ -117,7 +117,13 @@ impl<P: Program> Daemon<P> {
|
|||
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`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue