Yes I mean watchpoints on variables or values of custom Debug implementations. For complex types I usually implement a custom Debug trait. This means that when the Debug::fmt()
function is called it will print values that are not necessarily part of the struct or enum that the Debug
is implemented on. For example:
struct Data {
vec: Vec<T>
}
impl std::fmt::Debug for Data {
fn fmt(&self, f: &mut fmt::Formatter<`_> -> fmt::Result {
write!(f, "{}", format!("Data {{ vec: {:?} }}\nlength: {}", &self.vec, self.vec.len())
}
}
Which could yield:
Data { vec: [1, 2, 3, 4] }
length: 4
Would it be possible to make a debugger that could watch for when length >= 5
for example? This is very custom, but it could make the debugger very powerful.
Do you have a sponsor page on github? Are you still actively developing the debugger?