Showing the list of all the functions called, debug_backtrace() doesn't fits me


im trying to debug a symfony app.

I’ve added a debug_backtrace() calling to this function below. It outputs a list of functions called, but the save() function (that is just before the debug_backtrace() calling) is not that list… why? any other way to debug that shows more things, in this case the save() calling ?

protected function processForm(sfWebRequest $request, sfForm $form)

    if ($form->isValid())

      $sf_guard_user = $form->save();






Hi again,

i found this bug issue that is asking for maybe what i’m looking for:

As you can see the response is:

How is that different from a three-line function operating on the result array of debug_backtrace() ?

but i don’t what it means or how implement it.

Any help?


I don’t know of an automated way to get an ordered list of called functions(aside from adding a print statement to all functions). debug_backtrace() prints the call stack only.

xdebug can do it

Thanks I’m gonna try execution_trace.

What are the other stacks?



If you’re installing xdebug extension you may want to check this out: xdebug-trace script from here:

Screenshot (func calls trace + summary):

There are also some other functions useful when debugging, see example 3 using the debug() function:

I probably should have said it prints the current state of the call stack. While the save() method was executing, it was on the call stack. After the method returned, it got popped off the stack. There’s only 1 call stack. But, I understand what you’re asking for. I just don’t know the proper terminology for it.

Anyway, you might also consider using a php ide with support for an interactive debugger. They can be pretty nice, pausing the execution so you can control when you want it to advance. This lets you look at the current values of variables as they change, and you can navigate in and out of function calls, and a whole lot more. You basically ride the call stack as it executes.

Netbeans can integrate with xdebug and do all that. A lot of other ides have support either through xdebug, or other debugging extensions. It can take a bit of time to set up and learn though.

Thanks for all your advices.

At first, I’ve just got my target using

$usuario = $form->save();