diff --git a/crates/rune/src/runtime/value.rs b/crates/rune/src/runtime/value.rs index 43e5487cc..98414683c 100644 --- a/crates/rune/src/runtime/value.rs +++ b/crates/rune/src/runtime/value.rs @@ -2137,7 +2137,15 @@ impl fmt::Debug for Value { let mut o = Formatter::new(); if self.string_debug(&mut o).is_err() { - return Err(fmt::Error); + match self.type_info() { + Ok(type_info) => { + write!(f, "<{} object at {:p}>", type_info, self)?; + } + Err(e) => { + write!(f, "", self, e)?; + } + } + return Ok(()); } f.write_str(o.as_str())?; diff --git a/crates/rune/src/runtime/vm.rs b/crates/rune/src/runtime/vm.rs index ad693e15d..2ad362f3f 100644 --- a/crates/rune/src/runtime/vm.rs +++ b/crates/rune/src/runtime/vm.rs @@ -2239,7 +2239,7 @@ impl Vm { } #[inline] - #[tracing::instrument(skip(self))] + #[tracing::instrument(skip(self, return_value))] fn op_return_internal(&mut self, return_value: Value) -> VmResult> { let (exit, out) = vm_try!(self.pop_call_frame());