Saturday, May 15, 2010

Eclipse Php Zend Debugger

How to Debug PhP Code in ECLIPSE?
If you want to see variable values with mouse over and change them to see the effect in your program without echo statements, you need debugging. You can follow the steps below to set up a php editor with debugging. You can email me for questions.

  1. Install apache server
  2. Install Php from
    1. Select all necessary items such as mysql, openssl, dba
  3. Download ZEND plugins for eclipse
    1. Copy zenddebugger.dll to PHP directory
    2. Add these to your php.ini file

You may want to run phpinfo() script to see your actual php.ini file. You may have one copy at C:Windows directory.

4. Download Eclipse php editor with debugger. It will show you xdebug and zend for debugging.
5. Setup your work directory
6. Configure your debug options: it may launch at http://localhost. This is fine for the default settings.
7. Restart apache server after changing php.ini file
8. When you run in debug mode, Eclipse will ask you to load in perspective show detail debug screen
9. If you get error about php.ini directives, you should check you php.ini file. You can add phpinfo(); command line to list all properties of PHP. It will show you the address of php.ini file.

Summary: If you see zend debugger properties in your PHP property list, you have the debugging. Disable Xdebug if you have that. Zend and Xdebug may not work properly at the same time.

I am happy to have debugging in php. I guess no more "echo this echo that"

Best Regards,

        No comments:

        Post a Comment

        Let me know what you think?