How should I debug breakpoints in vscode

I have installed rust analyzer, and I can't enter the debug mode.

When I run through cargo run, does cargo have other commands to enter debug

cargo has got nothing to do with debugging - it merely creates a binary and may also run it if you tell it to do so.
What you are looking for is a debugger, such as lldb (preferably) or gdb, with which you can debug the binary.

1 Like

lldb (preferrably) or gdb? I'll try it. Thanks

If you want some debugging in vscode you can install this extension:



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.