Using Phpstorm + Xdebug to implement breakpoint debugging (ii) ____php

Source: Internet
Author: User
First, configure Xdebug

Configure Xdebug related parameters, add the following configuration in the php.ini file, if not installed, refer to the PHP installation Xdebug extension:

[Xdebug]
xdebug.remote_enable = on
Xdebug.remote_handler = dbgp
xdebug.remote_mode = req
Xdebug.remote_host = localhost
xdebug.remote_port = 9000
Xdebug.idekey = Phpstorm

Restart Apache to see if the configuration is active. Second, configure Phpstorm

1. Configuration Servers, the main configuration items are as follows:
Mac path: Phpstorm->preferences->languages & Frameworks->php->servers
Win path is: File->settings->languages & frameworks->php->servers

2. Configure debug to ensure that the debug port corresponds to the above, other options by default:
Mac path: Phpstorm->preferences->languages & Frameworks->php->debug
Win path is: File->settings->languages & Frameworks->php->debug

Third, configure XDebug helper

1. Search and install the XDebug Helper extension in Chrome.

2. After the installation is successful, locate the XDebug helper in the Chrome Extender list and click the option to select the IDE key option as Phpstorm. Four, use Phpstorm + Xdebug to implement breakpoint debugging

1. In the phpstorm to open Debug monitoring, click on the top right corner of the icon like a telephone, the icon green to indicate success;

2. Open the XDebug helper plugin in Chrome:

3. Set breakpoints in Phpstorm, click in front of the line of code that requires breakpoint debugging;

4. Access to the browser for breakpoint debugging, after success we will be able to see the following debugging information:

This article starts in Mayanlong personal blog, Welcome to share, reprint please indicate the source.
Mayanlong Personal Blog: http://www.mayanlong.com
Mayanlong Personal microblog: Http://weibo.com/imayanlong
Mayanlong GitHub Homepage: https://github.com/yanlongma

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.