Rust-analyzer debugging on VSCode does not jump into function


I am relatively new to rust-analyzer+vscode.

When I am debugging rust code in vscode running on Windows 11. My breakpoint is on a line that calls a function and I hit step-into (F11) I expect the IDE to move to the function. However a new window named "Symbol: <alloc::string::String as core::ops::deref::Deref>::deref" opens showing Machine language. I can debug the function only if I set a breakpoint inside the function.

  1. Why am I seeing this instead of the IDE jumping to the function?
  2. Is there a way to configure the default behaviour to jump into the function?


the vscode plugin codelldb tries to set lldb to skip the rust standard libraries in single steps, unfortunately due to the way rustc mangles the symbol name, it is not perfect. see:

for now, you'd better using break point on your function entry. if you have to use the step-in debugger command, when it stops at the library function, you can use the step-out command or Shift + F11 to get out of the library function then step-in again, sometimes you might need to repeat this several times before it reaches your own function. this is annoying but it's the current status.

Yes I figured that myself. Thanks

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.