pub struct DebugSession {
pub trace: TransactionTrace,
pub ethdebug: Option<EthdebugInfo>,
pub source_contents: BTreeMap<u64, String>,
pub functions: Vec<SourceFunction>,
}Fields§
§trace: TransactionTrace§ethdebug: Option<EthdebugInfo>§source_contents: BTreeMap<u64, String>§functions: Vec<SourceFunction>Implementations§
Source§impl DebugSession
impl DebugSession
pub fn new(trace: TransactionTrace) -> Self
pub fn with_ethdebug( trace: TransactionTrace, ethdebug: EthdebugInfo, source_contents: BTreeMap<u64, String>, ) -> Self
Sourcepub fn attach_ethdebug(
&mut self,
ethdebug: EthdebugInfo,
source_contents: BTreeMap<u64, String>,
)
pub fn attach_ethdebug( &mut self, ethdebug: EthdebugInfo, source_contents: BTreeMap<u64, String>, )
Attaches debug info to a session that already holds a trace, replacing whatever was attached before.
The trace is left in place rather than rebuilt, so a frontend that keeps a large trace resident can add or swap the contract’s artifacts without copying hundreds of thousands of steps.
pub fn step(&self, step_index: usize) -> Option<DebugStep>
pub fn steps(&self) -> Vec<DebugStep>
pub fn source_span(&self, pc: u64) -> Option<SourceSpan>
pub fn function_at_pc(&self, pc: u64) -> Option<&SourceFunction>
pub fn variables_at_step(&self, step_index: usize) -> Vec<DebugVariable>
Trait Implementations§
Source§impl Clone for DebugSession
impl Clone for DebugSession
Source§impl Debug for DebugSession
impl Debug for DebugSession
Source§impl<'de> Deserialize<'de> for DebugSession
impl<'de> Deserialize<'de> for DebugSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DebugSession
Source§impl PartialEq for DebugSession
impl PartialEq for DebugSession
Source§impl Serialize for DebugSession
impl Serialize for DebugSession
impl StructuralPartialEq for DebugSession
Auto Trait Implementations§
impl !Freeze for DebugSession
impl RefUnwindSafe for DebugSession
impl Send for DebugSession
impl Sync for DebugSession
impl Unpin for DebugSession
impl UnsafeUnpin for DebugSession
impl UnwindSafe for DebugSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more