Open io0000 opened 1 year ago
Are you building in debug mode? Can you provide an repro example?
debug mode
code snippet
fn call_with_one<F>(func: F) -> usize
where F: Fn(usize) -> usize
{
let mut var1 = 1;
var1 += 5;
println!("var1:{}", var1);
func(1)
}
fn main() {
let double = |x| x * 2;
let output = call_with_one(double);
println!("{}", output);
}
Works on Linux. Alas, MSPDB support in LLDB is kinda rough.
OS: win10 10.0.19045 VSCode version: 1.77.3 CodeLLDB version: 1.9.0 Compiler: rustc Debuggee: x86_64-windows-msvc, PDB
When debugging, it's not possible to see the values of variables inside a function that takes a lambda as an argument.
Verbose log