A real Rust debugger, with the keys you already know

Set a breakpoint in the margin, press F5, and the program stops on that line with its call stack and variables. Step over, step into, step out, run to the cursor, or let it run on.

The Rust Studio debugger paused on a breakpoint: yellow execution line, call stack, variables, watches and breakpoints in the Debug panel

Try the debugger

Click the margin to set breakpoints, press F5, then F10, F11 and Shift+F11 to step. The call stack, variables and watches follow.

Rust Studio · DebuggerInteractive · simulated
1fn square(n: i32) -> i32 {
2 let result = n * n;
3 result
4}
5
6fn sum_of_squares(limit: i32) -> i32 {
7 let mut total = 0;
8 for i in 1..=limit {
9 total += square(i);
10 }
11 total
12}
13
14fn main() {
15 let limit = 3;
16 let answer = sum_of_squares(limit);
17 println!("answer = {answer}");
18}

Call stack

Press F5 to start.

Variables

Locals show while paused.

Watch

  • total = …

Output

The program has not run.
Click the red margin to set a breakpoint, click a line to choose where Run to Cursor stops. Focus this demo and use the keys above.

Try it: press F5 (it stops on the red dots), then F10 over a call and F11 into it, watch total change, and finish with F5.

What you get

F9

Breakpoints

Click the left margin or press F9. They are kept between sessions, listed in the Debug panel, and shown hollow when the debugger could not place one.

F5

Start and continue

F5 builds with cargo and starts the program under the debugger; at a stop it continues. Ctrl+F5 runs without debugging, as in Visual Studio.

F10 · F11 · Shift+F11

Step over, into and out

Walk the code a line at a time, dive into a call, or leave the current function. The yellow line and arrow show where you are.

Ctrl+F10

Run to cursor

Put the caret on a line and run until the program gets there, without leaving a breakpoint behind.

Panel

Call stack, variables and watches

Pick a frame to see its locals, expand structs and collections, and add watches for the values you care about.

Hover

Values under the pointer

While paused, hold the mouse over a variable or a path like self.items to see its current value.

Break all

Pause a running program

Ctrl+Alt+Break stops a program that is running, wherever it is, and shows the stack.

Stop · Restart

Shift+F5 and Ctrl+Shift+F5

End the session and the program with it, or rebuild and start again in one key.

Debugging that works with your Rust toolchain

Rust Studio drives lldb-dap, the debug adapter that comes with LLVM, through the Debug Adapter Protocol. It builds your startup project with cargo, starts the program under the debugger, and shows what the adapter reports in the editor and the Debug panel.

On Windows the MSVC toolchain gives the debugger PDB symbols, so breakpoints, locals and call stacks refer to your Rust source. Install LLVM once (it includes lldb-dap); Debug, Debugger Setup tells you what is found and lets you point at a different copy.

  • Works with Debug and Release configurations
  • Solutions: debugs the startup project with its arguments and environment
  • Program output appears in the Output panel as it is printed
  • Watches are variable paths (x, p.field, v[0]), looked up safely in the current frame
The Rust Studio debugger paused on a breakpoint: yellow execution line, call stack, variables, watches and breakpoints in the Debug panel

Keys that match Visual Studio

If you have debugged in Visual Studio, your fingers already know this: F5, F9, F10, F11, Shift+F11, Shift+F5 and Ctrl+F10 do the same here. Everything is also in the Debug menu and the toolbar, which switches to Continue, Pause, Stop, Restart and the three step buttons while a session is active.

How it works

  1. Install LLVM once

    It includes lldb-dap. Rust Studio finds it by itself, or you choose it under Debug, Debugger Setup.

  2. Set a breakpoint

    Click the margin beside a line, or put the caret there and press F9.

  3. Press F5

    The project is built, started under the debugger, and stops on the breakpoint.

  4. Step and inspect

    F10 over, F11 into, Shift+F11 out. Look at variables, add a watch, hover a value, then F5 to continue.

Frequently asked questions

Which debugger does Rust Studio use?

It talks to lldb-dap, the debug adapter from the LLVM project, over the Debug Adapter Protocol. LLVM is free; its Windows installer includes lldb-dap.

Do I have to install anything?

Yes, LLVM (for lldb-dap) once. On some Windows builds lldb also needs Python 3.11 installed; Debug, Debugger Setup tells you if that is the case and lets you point at its folder.

Are the shortcuts the same as Visual Studio?

Yes: F5 start or continue, Ctrl+F5 run without debugging, F9 breakpoint, F10 step over, F11 step into, Shift+F11 step out, Ctrl+F10 run to cursor, Shift+F5 stop, Ctrl+Shift+F5 restart.

Can I debug a solution with several projects?

Yes. F5 debugs the startup project of the solution, with its run arguments and environment, after building it.

Is Rust Studio free?

Yes. Rust Studio is free for personal and commercial use, with no account, trial or licence key. It is closed-source freeware.

Which systems does Rust Studio run on?

Windows 10 and 11 (64-bit). You can build for Windows, the web and Android from it. iOS builds need a Mac with Xcode.