I'm trying to debug my Rust project in VSCode but the debugger doesn't step through the code. I have lldb configured as the debugger, but breakpoints aren't hit, and I can't step through my code. I’m using Windows 11 with the stable Rust toolchain.
VSCode Configuration (launch.json):
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Cargo launch",
"cargo": {
"args": ["build", "--lib"]
},
"args": []
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'f_rust'",
"cargo": {
"args": ["build", "--bin=f_rust", "--package=f_rust"],
"filter": {
"name": "f_rust",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
Steps Taken: Tried launching the debugger via the VSCode interface. The process runs, but I can't step through code or hit breakpoints. I’ve ensured there are no running instances of f_rust.exe before launching the debugger. I start debugger by clicking on debug button that appears above the a main method
debug console output:
Console is in 'commands' mode, prefix expressions with '?'.
Loading Rust formatters from C:\Users\...\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/etc
error: f_rust.exe :: Class 'enum2$<core::option::Option<alloc::sync::Arc<tokio_util::sync::cancellation_token::tree_node::TreeNode,alloc::alloc::Global> > >::Some' has a member '__0' of type 'alloc::sync::Arc<tokio_util::sync::cancellation_token::tree_node::TreeNode,alloc::alloc::Global>' which does not have a complete definition.
error: f_rust.exe :: Class 'tokio::util::linked_list::PointersInner<tokio::sync::notify::Waiter>' has a member 'prev' of type 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::sync::notify::Waiter> > >' which does not have a complete definition.
error: f_rust.exe :: Class 'tokio::util::linked_list::PointersInner<tokio::sync::batch_semaphore::Waiter>' has a member 'prev' of type 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::sync::batch_semaphore::Waiter> > >' which does not have a complete definition.
error: f_rust.exe :: Class 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::runtime::task::core::Header> > >::Some' has a member '__0' of type 'core::ptr::non_null::NonNull<tokio::runtime::task::core::Header>' which does not have a complete definition.
error: f_rust.exe :: Class 'tokio::util::linked_list::PointersInner<tokio::runtime::io::scheduled_io::ScheduledIo>' has a member 'prev' of type 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::runtime::io::scheduled_io::ScheduledIo> > >' which does not have a complete definition.
error: f_rust.exe :: Class 'tokio::util::linked_list::PointersInner<tokio::runtime::io::scheduled_io::Waiter>' has a member 'prev' of type 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::runtime::io::scheduled_io::Waiter> > >' which does not have a complete definition.
error: f_rust.exe :: Class 'tokio::util::linked_list::PointersInner<tokio::runtime::time::entry::TimerShared>' has a member 'prev' of type 'enum2$<core::option::Option<core::ptr::non_null::NonNull<tokio::runtime::time::entry::TimerShared> > >' which does not have a complete definition.
Launched process 28584 from 'C:\Users\...\f_rust.exe'
What I've Tried: Restarted VSCode and the system. Launched VSCode as an administrator. Tried cargo clean to clear any build artifacts. No log files are generated, and there’s no relevant output to stdout when starting from a terminal.