Search This Blog

Loading...

Thursday, September 10, 2009

FireSymfony-- Symfony Debugging with FireBug

If you are doing Symfony applications, you should not miss out this one: FireSymfony.

We all love firebug, don't we? Well, FireSymfony is an extension of firebug, that allows you to see the Symfony variables inside the much-beloved firebug:

With all the PHP, HTML and Javascript variables in one single panel, debugging suddenly seems so much easier.

To setup for FireSymfony, here's what you should do:

  1. Install FireSymfony as your FireBug extension
  2. Change your factories.yml by enabling the following:
  3. all:
      logger:
        class: sfAggregateLogger
        param:
          level: debug
          loggers:
            sf_web_debug:
              class: sfWebDebugLogger
              param:
                level: debug
                condition:       %SF_WEB_DEBUG%
                xdebug_logging:  true
                web_debug_class: fsWebDebugForSf12
            sf_file_debug:
              class: sfFileLogger
              param:
                level: debug
                file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
    
And you are ready to go!

Note: There is a typo at the Symfony blog (it should be fsWebDebugForSf12, instead of fsWebDebug) for Symfony 1.2.x, I've corrected the typo here. So if you follow my instruction here you will do just fine.

No comments: