phpphpstormzend-serverzend-debuggerzend-server-ce

Zend Debugger with Zend Server 5.6.0 & PhpStorm 5.0


I am running Zend Server 5.6.0 which is PHP 5.4 and I am using PhpStorm 5.0. I am looking to put some profiling and debugging in place.

I have configured everything that I can see in PhpStorm, when I run the debug from the IDE it runs the script, then displays Connection with 'Zend Debugger' was not established. Validate Installation.

I have installed the toolbar but whenever I try to debug a page in Firefox it actually pops up with a download window and the file downloads, when opened it displays a server error.

All of the help guides online dont seem to work, has anyone else has these issues?


Solution

  • I ended up using Xdebug:

    To Install Xdebug:

    1. Go to webpage.
    2. Paste your phpinfo() contents into the box
    3. Follow the instructions on the wizard page except for where it tells you to add zend_extension = C:\Zend\ZendServer\lib\phpext\php_xdebug-2.2.1-5.4-vc9-nts.dll to the top!, put this below the iOnCube Loader (if you have it installed)
    4. Add the following to php.ini then restart PHP & Apache.

    php.ini

    [XDebug] 
    xdebug.remote_enable=1 
    xdebug.remote_port=9000 
    xdebug.profiler_enable=0 
    xdebug.profiler_output_dir="C:\Zend\ZendServer\tmp\xdebug-profiler"  
    

    Xdebug in PhpStorm

    1. Generate and add bookmarklets to your browser here (Note the IDE key ##PHPSTORM##)
    2. Open File -> Settings -> PHP
    3. Choose your interpreter
    4. Click [..]and choose Debugger: Xdebug
    5. Click the "Configurations" then Edit Configurations... item (Drop down next to debug button on toolbar)
    6. Press the [+] to add a configuration and choose PHP Remote Debug
    7. Call it Xdebug and use the IDE key PHPSTORM
    8. You can now start the debugger (Alt+Shift+F9)
    9. Start the debugger using the bookmarklet

    You can now stop through code in PhpStorm, hope this helps someone