Mac+php+xdebug+phpstorm under Apple configuration Xdebug twists

Source: Internet
Author: User
Tags install brew install homebrew zts
1. Download the Xdebug file

http://xdebug.org/wizard.php

Copy the source code for Phpinfo () to the text box, Xdebug will prompt you to configure and download which version of Xdebug.

Full Download Address:

http://www.xdebug.org/download.php

Instructionsdownload xdebug-2.3.3.tgzunpack the downloaded file with Tar-xvzf xdebug-2.3.3.tgzrun:cd xdebug-2.3.3run:p Hpize (See the FAQs If you don't have phpize. As part of the IT output it should show:configuring for: ... Zend Module API No:      20121212Zend Extension API No:   220121212If It does not, your is using the wrong phpize. Please follow this FAQ entry and skip the next step. Run:./CONFIGURERUN:MAKERUN:CP modules/xdebug.so/usr/lib/php/extensions/no-debug-non-zts-20121212edit/etc/ PHP.ini and add the Linezend_extension =/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.sorestart the Webserver

There are many installation tips on the Xdebug website. Some of the issues that may arise are:

Phpize is not installed: Then install Brew again, then install autoconf can be described as twists

2. Solve the problem of the related components not complete

Problem description Mac System upgrade to 10.9 (Mavericks) when installing PHP extension, execute phpize prompt following error: Cannot find autoconf. Please check your autoconf installationand the $PHP _autoconf environment Variable. Workaround first Install Homebrew: If the following link is invalid, you can visit the brew website. http://brew.sh/
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install Autoconf:brew installed autoconf

3. Configure PHP.ini

The configuration on the Xdebug network can only be configured correctly xdebug but not with Phpstorm. Add the following code at the end of the php.ini:

[xdebug]zend_extension= "/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so" xdebug.remote_enable = Onxdebug.remote_handler = "DBGP" xdebug.remote_host = "localhost" xdebug.remote_port = 9000xdebug.idekey = PHPSTROM

4. Configure Phpstorm

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 Choose 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.

Open the Monitor (phone button) in the Phpstorm.

Xdebug Configuration for 5.chrome

Configure it as "Phpstorm" in IDE key

Project Address: Https://github.com/mac-cain13/xdebug-helper-for-chrome

Well, to this can be configured to complete, if there is a problem can give me a message, we communicate together.

6. Other:

Restart Apache

sudo apachectl restart

Modify PHP.ini Permissions

sudo chmod 0777 php.ini

Edit PHP.ini File

sudo vi php.ini (Modify I, exit: Q, save exit: Wq)

  • 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.