Setting up XDEBUG with PHPStorm and MAMP

Step One Download and install PHPStorm, and MAMP. (See http://56kilobit.com/?p=1) for links. Step Two In MAMP File -> Edit Template -> PHP -> PHP 5.x.x.ini Add this to the XDEBUG section at the bottom: [code] [xdebug] zend_extension=”/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so” xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.remote_handler=dbgp xdebug.remote_enable=1 xdebug.remote_connect_back=1 xdebug.remote_autostart=0 xdebug.remote_log=”/var/log/xdebug.log” xdebug.overload_var_dump=1 xdebug.trace_format=1 xdebug.show_exception_trace=1 xdebug.default_enable=0 xdebug.profiler_enable_trigger=1 xdebug.max_nesting_level=500 [/code] Check the PHP version matches your selected MAMP PHP version exactly. Change the path of no-debug-non-zts-20090626/xdebug.so to match the one in your folder (Applications/MAMP/bin/php/php5.3.14/lib/php/extensions). Save and stop/start MAMP. Step Three Generate the XDEBUG bookmarks from here and add to your browser bookmarks. http://www.jetbrains.com/phpstorm/marklets/ Step Four Open PHP Storm and place a break point in your PHP project (on a line of code which will be executed when you load a page!). Step Five Click the start debugger bookmark you added in your browser. Open your application in your browser. If all is well, PhpStorm should ask you if you’d like to accept the incoming debugger connection. Click allow, execution should break at the breakpoint you placed in your code and the debug panel should open. Start debugging!