MacGDBp has a setting called “Break on first line of execution”, which I turned off.. but it doesn’t seem to do anything. It still catches and breaks every single query, making it a useless app to use.
Does anyone use MacGDBp that knows a way around this? I’d love to make use of it, but at this point it’s not worth it.
Thanks
I realize that this could be much more involved, but that sounds like what happens when you step through the code.
Which button are you clicking? The Continue button should jump to the next breakpoint.
I grabbed this from:
Debugging your PHP Code: XDebug on MAMP with TextMate and MacGDBp Support
From left to right, the buttons are:
Step into: Clicking this will advance the debugger one step and, if necessary, go “into” the function, class, file, etc. By clicking this button repeatedly, you can step through every part of the process.
Step out: This will move up a level. For example, if you are mid-way through a function and you step out, the debugger will advance to the next part of the code, skipping the remainder of the function.
Step Over (Skip): This will skip examining the next step. For example, if the current line is pointing to a function, and you do not want to see the function execute, you can skip it with this button. Clicking this will simply advance to the next line in the current scope.
Continue (Play): Continue execution until either the next breakpoint or the end of the script.
Reset: Remove the current debugging session and wait for the next request from the server.
Using these buttons, you can navigate through the execution of a script. While this will give you a detailed step-by-step analysis of a program as it executes, it can often be overkill. More often, you will want to analyze just a small part of your script. That is best accomplished with breakpoints.
A breakpoint is a marker that tells the debugger to pause when the location is reached. Using breakpoints, you can set the debugger to play through most of the code, pausing only when it gets to the portion of interest.
EDIT: February 26, 2012
Hi Naatan,
You could take a look at the xdebug logs by adding this line to your php.ini file:
You can determine if MacGDBp is sending any breakpoints and if it’s sending a run command or a step_into command.
Here is what I see for six different scenarios. I stripped out most of the data as it took a lot of space, let me know if you need to see data for a specific line.
1) “BREAK ON FIRST LINE OF EXECUTION” = OFF AND NO BREAKPOINTS
2) “BREAK ON FIRST LINE OF EXECUTION” = ON AND NO BREAKPOINTS
3) “BREAK ON FIRST LINE OF EXECUTION” = ON, WITH BREAKPOINT ON FIRST LINE
4) “BREAK ON FIRST LINE OF EXECUTION” = ON, WITH BREAKPOINT ON LINE 10
5) “BREAK ON FIRST LINE OF EXECUTION” = OFF, WITH BREAKPOINT ON FIRST LINE
6) “BREAK ON FIRST LINE OF EXECUTION” = OFF, WITH BREAKPOINT ON LINE 10
Be Well,
Joe