Phpstorm Debug Laravel

Source: Internet
Author: User
Tags php debug php script

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.