Reference:http://www.cnblogs.com/imayanlong/p/6375950.html, 1190000004505815
First, configure the Xdebug
Configure Xdebug related parameters, add the following configuration in the php.ini file, if not installed, refer to the PHP installation Xdebug extension:
onxdebug.remote_handler = dbgpxdebug.remote_mode = reqxdebug.remote_host = localhostxdebug.remote_port = 9000xdebug.idekey = PHPSTORM
Restart Apache to see if the configuration is in effect.
Second, the configuration Phpstorm
1.
Configuration Servers
, major configuration items such as:
Mac path: Phpstorm->preferences->languages & Frameworks->php->servers
The Win path is: File->settings->languages & frameworks->php->servers
2.
Configuration Debug
, make sure the Debug port corresponds to the above, and the other options are default:
Mac path: Phpstorm->preferences->languages & Frameworks->php->debug
The Win path is: File->settings->languages & Frameworks->php->debug
Enable the next phpstorm in debug Listening: Click Run->start Listening for PHP debug Connections, then click on the lower right corner under the triangle settings:
Picture description
You can choose to create a new PHP Web application or php Script, choose PHP Web application to configure the next server, the default local development and route to localhost, the configuration is as follows:
Picture description
Here is an example of PHP script, as follows:
Picture description
Then click on the crawler icon in the top right corner to perform the debugging, and each variable value is displayed in the Debug console:
Picture description
Probably talked about the next in the Phpstorm configuration xdebug, no matter how, must be configured well xdebug, which in peacetime reading code, especially Laravel source will be very useful.
Phpstorm Debug Laravel