https://code.visualstudio.com/docs/languages/rust#_debugging
In vscode:
- Press
Ctrl/Cmd+
to open theSettings
editor and setDebug: Allow Breakpoints Everywhere
- Install the CodeLLDB vscode extension
- Set a breakpoint in your rust program
- Open the command pallet with
Ctrl/Cmd+Shift+P
and run the commandRust Analyzer: Debug and select the program