A real Rust debugger, with the keys you already know

Ruststudio has a built-in Rust debugger that drives lldb-dap from LLVM: breakpoints, step over, into and out, run to cursor, call stack, threads, variables, watches, hover values and an Immediate window, on F5, F9, F10 and F11.

Updated · describes Ruststudio 0.1.7

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

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.

At a glance
Debug adapterlldb-dap (LLVM), over the Debug Adapter Protocol
NeedsLLVM installed once; Debug, Debugger Setup finds it
KeysF5, F9, F10, F11, Shift+F11, Ctrl+F10, Shift+F5, Ctrl+Shift+F5
PanelsCall stack, locals, watches, breakpoints, threads, Immediate

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.

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.

Try it

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.

Ruststudio · 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.

Debugging that works with your Rust toolchain

Ruststudio 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 Ruststudio debugger paused on a breakpoint: yellow execution line, call stack, variables, watches and breakpoints in the Debug panel
The Ruststudio debugger paused on a breakpoint: yellow execution line, call stack, variables, watches and breakpoints in the Debug panel

Familiar keys, and a toolbar that follows the session

F5, F9, F10, F11, Shift+F11, Shift+F5 and Ctrl+F10 are the debugging keys many IDEs share, and they 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 does it work?

  1. Install LLVM once

    It includes lldb-dap. Ruststudio 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

Something else? Ask in the community forum or send feedback.

Which debugger does Ruststudio 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.

Which keys does the Ruststudio debugger use?

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 Ruststudio free?

Yes. Ruststudio is free for personal and commercial use, with no licence key and nothing to pay. Use it for 7 days straight away; after that you sign up for a free account with your e-mail address. It is closed-source freeware.

Who makes Ruststudio?

Ruststudio is a product of FOWLGUARD, Inc., the company behind Fowlguard Secure and Fowlguard Productivity. It is one of its free tools; see fowlguard.com.

Which systems does Ruststudio run on?

Windows 10 and 11 (64-bit), macOS 11 or later (Apple silicon and Intel) and Linux (x86-64, X11 or Wayland). You can build for the desktop, the web and Android from it. Native iOS support is in development and will need a Mac with Xcode.