Phpstorm configuration Xdebug Debug Summary [Mac/linux]

Source: Internet
Author: User
Tags install homebrew php server custom name

I am accustomed to netbeans-xdebug debugging

I was developed on Mac, everyone Linux configuration Xdebug can also refer to

My PHP is installed via Mac homebrew, so xdebug installation I also use homebrew (similar to Linux Wget/yum)

Go directly to the session-operation command step as follows:

1 mac Installation Homebrew:ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

2 Configuring PHP.ini

(1) View PHP Version: Php-v (5.3/5.4/5.6/. )

(2) Brew Search Xdebug
Homebrew/php/php53-xdebug Homebrew/php/php54-xdebug Homebrew/php/php55-xdebug Homebrew/php/php56-xdebug

(3) Brew Install Homebrew/php/php55-xdebug (choose xdebug that matches the PHP version)

(4) Locate the xdebug.so file path (/usr/local/cellar/php55-xdebug/2.3.3/xdebug.so)

(5) Found php.ini file (php-i | grep php.ini)

Configuration File (php.ini) Path = =/usr/local/etc/php/5.5
Loaded Configuration File =/usr/local/etc/php/5.5/php.ini

(6) Modify the php.ini add a bit of configuration

zend_extension= "/usr/local/cellar/php55-xdebug/2.3.3/xdebug.so"
Xdebug.remote_enable=1
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Xdebug.remote_handler=dbgp

(7) Restart PHP:/usr/sbin/php-fpm restart

3 Configuring Phpstorm

(1) Enter preferences

(2)->build,execution,deployment->deployment-> ' + '->add Server, name Custom name, type select in place

(3)

4

Click Validate Remote Environment for validate, information show full green/blue without warning, stating validate through

5

Debug, PHP

Right Xdebug configuration

Debug port:9001

Other Items not checked

############ #图片不知怎么回事上传不上去 #########

6

PHP--Debug-DBGP Proxy

IDE key: (Phpinfo search Xdebug, view the IDE key shown, write here)

Host: The address of the debug project

port:9001

7

Run, Edit configutations

Go to the left point "+" to add PHP Web applications,

Right:

Name from anywhere

Configuration

Sever: Select the previously configured PHP Server

Start URL: Debug Project Address (HTTP://XXXX)

Browser: Recommended Chrome (supports Phpstorm plugin)

When you're done, add a breakpoint somewhere in the index.php, and the Run->debug will jump to the breakpoint;

If you want to test a certain method of a controller, you can add a breakpoint in the method and then debug jump to the browser, at this time, add the requested controller on the URL, method, parameters can jump to the breakpoint;

Thank you, I hope to help you, if there are shortcomings, please forgive me, the image of this first pass, really can't all pass up, after a good study.

9

10

Source: http://blog.csdn.net/mcc8757/article/details/48830243

Phpstorm configuration Xdebug Debug Summary [Mac/linux]

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.