This document explains to you
This tutorial explains how to install Xdebug extension to your
web server and prepare it to be used for
debugging with PhpStorm IDE.
Downloading, Installing and Configuring the Xdebug Extension
- Download the Xdebug extension compatible with your PHP version (mind the PHP version number and thread-safe/non-thread-safe option) from the official site. These instructions are based on the latest version in the 2.x release of Xdebug.
- Copy the extension file to your Web web server in a location that is accessible by the Web web server.
Add the following lines at the end of your php.ini fileon the Web server
xdebug.remote_host=<the host where PhpStorm
is running (e.g. localhost)> xdebug.remote_port=<the port to which Xdebug tries to connect on the host where PhpStorm
is running (default 9000)>
Since PHP 5.3, you always need to use the 'zend_extension', and NOT 'zend_extension_ts', 'zend_extension_debug' or 'extension'.
or an IP address
The value of 'xdebug.remote_host' can be a host name
(e.g. localhost) or an IP address.
The value of 'xdebug.remote_port' is usually 9000. It is default value in Xdebug and PhpStorm. Ensure that the specified port is opened on your client machine.
For additional information check http://xdebug.org/docs/remote
- Restart your Web web server
- Check your installation:
Execute in the terminal
Or create a file with the following content:
- Open a page corresponds to this file and check phpinfo() output. It should contain Xdebug section:
Image Removed Image Added
Once you've installed and configured Xdebug, you can use the Validating Your Debugging Configuration tool to confirm that the configuration of Xdebug and PhpStorm are compatible.
- Details about Xdebug configuration from the official Xdebug site
- JetBrains Web PhpStorm web help page about Xdebug configuration
- Tailored Installation Instructions