IDE = Xdebug = Apache (XAMPP) + Firefox + easist Xdebug
1>xampp stop Apache Service;
2> locate php.ini in the installation directory, similar to D:\xampp\php\php.ini, open and locate the item that was commented out and set it as follows:
Zend_extension = "D:\xampp\php\ext\php_xdebug.dll" (as determined by the actual situation)
Xdebug.remote_enable =1
Xdebug.remote_handler = "DBGP"
Xdebug.remote_host = "localhost"
Xdebug.remote_mode = "req"
Xdebug.remote_port = 9000
Save the file and restart Apache.
[note] Where Remote_host is the address of the debug client, the IP where the IDE resides, and Remote_port is the port of the client
3> Open Phpstorm,
-Enter file>settings>php>servers, here to fill out the server side of the relevant information, name fill localhost,host fill Localhost,port fill
80,debugger selected Xdebug
-Enter File>settings>php>debug, see Xdebug tab, Port Fill 9000, other default
-Enter FILE>SETTINGS>PHP>DEBUG>DBGP proxy,ide key to fill in the Phpstorm,host fill Localhost,port 80
-Click OK to exit the settings.
Emphasize: If you set up a virtual host, then you can have two directories,
Your first localhost is set to the right, then you see OK, click OK to save, open access to the virtual host but not the IED breakpoint. The problem is that the following virtual host www.haitaohua.com, which also requires you to set the name and host values. Or you can change the php.ini inside the host and name value should also be OK (I did not test). Click on the virtual hostname, then go in and change to Localhot, then confirm, then your virtual host can be breakpoint test.
4> Open Browser Firefox, install Xdebug plug-in, tool settings Ide-key fill in phpstorm, add localhost to whitelist, later
It's good to turn on the tools when you're debugging.
[note] If you are using a different browser, you can access http://www.jetbrains.com/phpstorm/marklets/, fill the phpstorm on the right, point
Generate, add the following link to the Favorites folder for easy invocation.
5> Open the Monitor (phone button) in Phpstorm.
6> Open the Xdebug tool in the browser, access localhost, connect with phpstorm successfully!
Linux installs the sudo apt-get install PHP5-CLI first; sudo apt-get install php5-xdebug;
2. Add Xdebug to PHP php.ini
PHP.ini in a few folders under/etc/php5/, there should be three folders: Apache2, CLI, CONF.D, we should modify apache2 and the CLI under PHP.ini. Under CONF.D, there is a Xdebug.ini file that records the path of the Xdebug file. Ha, I am not an old hand, some of the experts do not say this.
Add the following in the php.ini:
[Xdebug]
xdebug.remote_enable = 1
Xdebug_remote_host = "localhost"
Xdebug.remote_port = 9000
Xdebug.remote_handler = "DBGP"
Zend_extension=/usr/lib/php5/20121212/xdebug.so//This is going to the specific directory to find
Phpstorm Configuration Xdebug