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.
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.
Going through every line of code is not the most efficient way to debug, sooner than than later you'll want to start debugging at a particular line in a file or function, eventually with practice you'll be wanting to start debugging when certain criteria has been met.
Load the file you want to debug, if it is not already loaded in Komodo.
Drupal has some pretty big nested data structures, so this feature is a nice way to see those values. Click on the Locals tabpage.
Watching variables is a common task programmers wish to employ when debugging. Usually the scenairo is that you want to know why a certain variable gets a certain value.
To add a variable to the watch list, first select the Watch tab on the bottom left of Komodo. Now click the square dotted icon with the yellow highlight on the top left of it. This will bring up the following dialog. In here type the variable name you wish to add to the watch list.
a Call Stack is a special stack which stores information about the functions/subroutines in a computer program which are currently being executed. It is a stack because when one function calls another, rather than simply jumping to another part of the program.
We can see a call stack in Komodo. Clicking on entries in the Call Stack will cause the text editor section to jump to that particular function definition.
Here we can see that the main section in file index.php at line 15 called the function menu_execute_active_handler in file menu.inc at line 396. The Call Stack helps you to follow the flow of execution of the program.
Komodo is a good way to browse the php code, and functions in particular.
Then when you click on function, you can view the comments for that function. Notice the search form, typing in part of the function name will filter the window to only show functions which contain the search text. Here I typed 'cache'...
To remove breakpoints , view the current breakpoints in the Breakpoints tabpage. Click on the breakpoint you wish to remove and then click on the red circle icon with a black cross. To delete all breakpoints click on the icon with two red circles and a black cross. To toggle whether a breakpoint is active or not, click on the icon with the red and white circle.