Make sure you create the folder c:\tmp\xdebug\ or replace it with your folder. Then restart your web server. With these steps Xdebug is configured for profiling application and remote debugging.
Installing Xdebug :
The Xdebug is freely available from http://xdebug.org/.
If you use Windows, you can download the precompiled module for your PHP version. Installation is easy. Just place the DLL file to a directory (e.g. c:phpext) and add the following line to the php.ini file:
Don’t forget to change the path and filename to the correct one. Note that from PHP 5.3 onwards, you need to use zend_extension instead of zend_extension_ts.
Restart your web server. Create a php file that calls phpinfo() or use php -m if you have a command line version of PHP. Information about Xdebug module should appear twice (once under PHP Modules and once under Zend Modules).
Note that Xdebug does not work together with Zend Optimizer or any other Zend extension (DBG, APD etc). Perhaps you'll have to comment the line of Zend Optimizer.
;zend_extension_manager.optimizer_ts = "C:phpzendOptimizerlibOptimizer"
Now Xdebug is installed and configured. You may start using it right away or go on reading the article and learn how to debug PHP scripts in the Notepad++.
Using Xdebug and Notepad++ with DBGp plugin
To debug your scripts in the Notepad++, you need to perform next steps.
Install Xdebug as described above.
Add the following lines to the php.ini file just below the line zend_extension_ts="c:phpextphp_xdebug-4.4.1-2.0.5.dll":
xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_mode=req xdebug.idekey=default xdebug.remote_log="c: mpxdebugxdebug.log" xdebug.show_exception_trace=0 xdebug.show_local_vars=9 xdebug.show_mem_delta=0 xdebug.trace_format=0 xdebug.profiler_enable = 1 xdebug.profiler_output_dir ="c: mpxdebug"
Make sure you create the folder c: mpxdebug or replace it with your folder. Then restart your web server. With these steps Xdebug is configured for profiling application and remote debugging.
Download and install the Notepad++ (V4.3 or higher).
Download the latest release of DBGp plugin. Unzip the file and move dbgpPlugin.dll to the plugins folder of your Notepad++ installation folder (e.g. C:Program FilesNotepad++plugins). Be sure to read theReadme.txt that is bundled with plugin for the latest information.
Now open the Notepad++. You should see the DBGp option in the plugins menu.
If you receive the error message that DBGp plugin is not compatible with current version of the Notepad++, install the earlier Notepad++ version (V4.4 works fine).
Click the Config… item and configure the DBGp debugger as shown. The Remote Path and Local Path is the folder where your php files reside.
Click Ok and you are done!
To start debugging open a php file in the Notepad++ and add a breakpoint to the script. In a browser add ?XDEBUG_SESSION_START=session_name to the end of the url. session_name could be anything you want (e.g. http://localhost/test.php?XDEBUG_SESSION_START=test). You should see the Notepad++ icon blinking on the taskbar. Click on it and start debugging
There is the Mozilla Firefox extension Xdebug Helperthat allows you to start/stop debugging and profiling without having to use XDEBUG_SESSION_START as parameter.