views:

38

answers:

2

Hi,

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)
  {
    $form->bind($request->getParameter($form->getName()));

    if ($form->isValid())
    {

      $sf_guard_user = $form->save();

      var_dump(debug_backtrace());
     die("fsdgsgsdf");

      $this->redirect('guardausuario/edit?id='.$sf_guard_user-
>getId());

    }
  } 

Regards

Javi

+1  A: 

Symfony's web developer bar has some great information.

What exactly are you trying to see? Somethings it is good to echo $form because it will reveal all of the fields and any hidden fields in the form. Also, remember to include [_csrf_token] in your View if you are writing a custom View.

And... Symfony and xDebug are a good combination.

Christopher Altman
I want _just_ to find a way to see all the functions called before that debug_backtrace().
That'll be a longgg list...
Steve
I don't mind :).
+2  A: 

I've just got my target using

xdebug_start_trace('/tmp/foo');
$usuario = $form->save();
xdebug_stop_trace();

http://www.xdebug.org/docs/all_functions

Javi