I debug the followinge extremely simple unit test:
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let mut v = Vec::new();
assert_eq!(v.len(), 0);
v.push(10); //Breakpoint here.
assert_eq!(v.len(), 1);
}
}
Set breakpoint as in the screenshot
Start debugging (by clicking the Debug code lens provided by rust-analyzer)
Step to next line (state in the screenshot)
Expected: The left debugging side bar shows v as a local Vec with one entry.
Actual: It shows v as an empty Vec. Paradoxically, if I hover over v in the source code, it shows its correct content in the popup. In the screenshot, you can see both conflicting visualizations of v at the same time.
OS: Linux (Debian Testing) VSCode version: 1.77.1 CodeLLDB version: 1.9.0 Compiler: rustc 1.68.2 Debuggee: x86_64-unknown-linux-gnu
I debug the followinge extremely simple unit test:
Expected: The left debugging side bar shows v as a local Vec with one entry.
Actual: It shows v as an empty Vec. Paradoxically, if I hover over v in the source code, it shows its correct content in the popup. In the screenshot, you can see both conflicting visualizations of v at the same time.
Verbose log