Stepping
Overview of the stepping commands.
Step commands
Here is a list of available commands for stepping through a stopped program:
stepi- step a single instructionstep(alias:stepinto) - step a program until it reaches a different source linenext(alias:stepover) - step a program, stepping over subroutine (function) callsfinish(alias:stepout) - execute a program until the selected stack frame returns
Usage example
Consider this Rust code:
fn print_hello(print_num: u32) {
for _ in 0..print_num {
println!("Hello, world!");
}
}
fn main() {
let print_num = 3;
print_hello(print_num);
}
And try to do some steps after breaking at the main function: