Common commands in a debugger

Barry Pretsell's picture

The following commands are common in most debuggers, and anyone who has used a debugger in another language, e.g. C, Perl will feel at home.

 

debug commands panel

These are reading from left to right: Step In , Step Over, Step Out, Go/Continue, break now, Stop, Detach

Step In

This will follow the code, so that if you step into a line containing a require statement or a function call, pressing this button will cause the debugger to go to the include file for a require statement, or the file containing the function definition for function calls.

Step Over

This will not follow the code, it will step over to the next line to execute. This is the most common action, and certainly you'd generally want to step over require statements.

Step Out

Allows you to step out of a function or include file. Useful if you accidentally stepped into something or you've seen enough and want to return to where the include file or function was called from.

Go/Continue

Usually you would use this one if you have some breakpoints set up. Under such circumstances you want to let the debugger continue execution as you know the debugger will halt when the next break point is reached.

Stop

Stop debugging. You may have seen enough to know the case of your problem or you are just fed up!

Detach

Stop the debugging process, but instead of stopping continue execution of the program.