Phpstorm added Xdebug debugging under Mac

Source: Internet
Author: User

First, version information

Mac 10.10.5

PHP 5.5.38

Phpstorm 10.0.3

Xdebug version needs to match PHP, match address: dot I match point I view all versions

Hint: not sure Xdebug version, the Phpinfo () display of all copies (Command+a select all Command+c copied) to the text box, Xdebug will automatically jump to the download configuration page, the page prompts the process to install.

Second, installation Xdebug

1. Click on the matching address to paste the copied phpinfo information into the text box.

2. Install Xdebug According to the installation process of the page.

3, Configuration PHP.ini

Hint: Xdebug official network configuration, only ensure the configuration is good xdebug, but can not be configured with Phpstorm, the correct configuration method, add the following code under the Add Xdebug module.

[xdebug]zend_extension =/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so  // This is the configuration xdebugxdebug.remote_enable = ON//Whether the remote terminal is running, must be turned on xdebug.remote_handler = "DBGP" xdebug.remote_host = "localhost" Xdebug.remote_port = 9000//  This port number is consistent with Phpstorm, the port of the example is 9001xdebug.idekey = phpstrom//Debugger keyword

To install the Xdebug legend:

(1)

(2)

4, check phpinfo (), there is no open xdebug.

Third, configure Phpstorm to support Xdebug

1, click on the upper left corner phpstorm, select Preferences.

2, configure the debug under PHP

3. Configure DBGP proxy under Debug

4, configuration servers

5, click on the Phpstorm in the upper right corner of the triangle, select Edit configurations, configure the server information, add the project debugging development address, after saving Phpstorm configuration is complete.

(1)

(2)

(3)

Iv. Chrome Installation Xdebug

Xdebug for Chrome (Chrome plugin store, ladder required)

Configuring the Xdebug plugin (can be omitted)

Five, breakpoint program debugging

1, in need to debug the code left blank left click on the red Circle button, and then click the Red button to cancel.

2, click the Phpstorm in the top right corner of the beetle button to open the browser, to ensure that the next phone icon is green, red means to close debugging, when the program runs to the breakpoint (not including the current breakpoint line), will stay and return from the browser page to Phpstorm, the browser will be in the loading wait.

3, after the browser jumps open Phpstorm, the page and the debugger box will have the data information display, for example.

Code page:

Debugger Box:

Six, the debugging process warning prompt

Pop-up window is when the program is debugging, trying to close the phpstorm when the prompt, this time can be completed debugging and then close, or end debugging and then close.

At this point, the Mac Phpstorm add Xdebug end, I wish you all the good code without bugs!!!

Phpstorm under the Mac adds Xdebug debugging

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.