![]() |
Anjuta Manual version 0.1Copyright (c) Kh. Naba Kumar Singh |
Contents | Index | Shortcuts |
PREV:Breakpoints | UP:Contents(Debugging) | NEXT:Evaluating/Inspecting expression |
The program execution in debugger can be finely is controlled. You can execute the program in single steps or let is continue till it encounters a breakpoint. Executing the program in such a manner is very essensial for tracking the program behaviour. In other words, like a video editing session, the program is executed in slow motion and you have the remote control to forward, pause, stop etc.
Followings are the way you can execute the program in the debugger.
Single stepping executes only one statement of the program (from where ever it has stopped) and returns the control to you. If the statement that is executed contains one or more functions, then it tries to step inside the functions also (in the sequence the functions are executed). Once the statement is executed and the control is passed to you, you can study the various program parameters.
If the program has not been currently started when you step in, then the program will be started and will be stopped at the first statement of the program (ie the first statement in the function main).
You can single step in program by activating Debugger->Execution->Step in or by clicking the step in icon in the debug toolbar.
Step over is exactly similer to step in, except that it won't step inside any function in the statement being executed. The statement will be executed in one go.
You can single step over the program by activating Debugger->Execution->Step over or by clicking the step over icon in the debug toolbar.
Step out will execute the current function till it is returned. The program will be stopped once it exits from the function. To be frank, Step out is not single stepping, because it does not executes a single statement. It will execute the whole function (till it returns to the calling function). But I somehow didn't know what to call it other than Step out. Probably, I should have called it Run till return or Finish the function. Nevermind, I hope it is understood what this command does.
You can single step out the program by activating Debugger->Execution->Step out or by clicking the step out icon in the debug toolbar.
This will continue the execution of the program till a breakpoint is encountered or the program exits.
If the program is not yet started, then the program will be started and continued.
You can continue the program by activating Debugger->Execution->Run/Continue or by clicking the Run/Continue icon in the debug toolbar.
This will kill the the program which is being debugged. Remember you cannot stop an attached process.
You can stop the program by activating Debugger->Stop Program.
This will stop the program first and then restart it again. All the breakpoints will remain in effect. Remember you cannot restart an attached process.
You can restart the program by activating Debugger->Restart Program.