This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Use Xdebug to debug Symfony, variable value not shown

New topics about Symfony 2 should go here

Use Xdebug to debug Symfony, variable value not shown

by iospapapa » Tue May 19, 2015 2:42 am

I am using NetBeans(Xdebug) to debug my Symfony project, but found many variable value cannot be shown. For example, here we hava a class from Symfony framework, when Xdebug is debugging into this class, all the $moduleName, $actionName value cannot be shown(even add them into watches):

Code: Select all
class sfFrontWebController extends sfWebController
{
  public function dispatch()
  {
    try
    {
            sfFilter::$filterCalled = array();
            $request    = $this->context->getRequest();
      $moduleName = $request->getParameter('module');
      $actionName = $request->getParameter('action');
      if (empty($moduleName) || empty($actionName))
      {
        throw new sfError404Exception(sprintf('Empty module and/or action after parsing the URL "%s" (%s/%s).', $request->getPathInfo(), $moduleName, $actionName));
      }
            $this->forward($moduleName, $actionName);
    }
    catch (sfException $e)
    {
      $e->printStackTrace();
    }
    catch (Exception $e)
    {
      sfException::createFromException($e)->printStackTrace();
    }
  }
}



Is this because PHP xDebug is quite weak?
If using Eclipse to debug JaveEE SSH projects, can I see the value of each variable??

I want to use Xdebug to trace each line of the project, in order to get a better understanding of how Symfony works(also want to learn web development design). I found out that if an object is created using Factory pattern, Xdebug cannot show this object. This is all because PHP doesn't have a good IDE such as Eclipse or VS?

If Xdebug cannot do it, then if I really want to master Web development, guess I must learn JavaEE, coz it seems most Symfony's idea is from JavaEE
iospapapa
Junior Member
 
Posts: 1
Joined: Tue May 19, 2015 2:34 am