Skip to main content

Running the debugger

Starting a debugger session

To debug a program from a binary file, use:

bs my_cool_program

To pass arguments to your program:

bs my_cool_program -- --arg1 val1 --arg2 val2

To attach to a running process by its PID:

bs -p 123

Getting Help

Print help to view all available commands.

Starting and restarting programs

  • run (alias: r) - start or restart the program

Controlling program execution

The debugger stops your program when:

  • breakpoints are hit
  • watchpoints are triggered
  • step commands complete
  • OS signals are received

BugStalker always stops the entire program, pausing all threads. The thread that caused the stop becomes the currently selected thread.

Continue execution

  • continue (alias: c)- resume execution of a stopped program

Quit

  • quit (alias: q) - exit BugStalker

Usage example

Consider this Rust program:

fn main() {
println!("hello world");
}

Now you can run, restart, and continue execution (after breakpoint are hit) of this program: