I am debugging this simple Rust program on Vscode
fn main() {
let u8: u8 = 3;
let b: u16 = 5;
let c: u32 = 7;
let d: u64 = 9;
}
The values of these variables are displayed correctly, except for u8
I'm curious, is there a reason or a solution for this issue? Thank you!
Edit
Here's my launch.json configuration. I also followed a tutorial and installed the C/C++ extension with "type": "cppvsdbg", but it gives me the same result.
I'm also adding that I am a Rust newbie :)
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/<your program>",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
Edit Thanks to @Unapiedra & @ChayimFriedman, for their answers and insights. I couldn't solve this problem. But here's what I tried, someone might pick it up in the future
- I autogenerated
launch.json(thx @Unapiedra) - Following this doc, I added this to my launch configuration
"preRunCommands": [
"type format add --format hex int" // This is a test from lldb.llvm.org/use/variable.html
]
But it didn't work. I also tried initCommands to no avail.
