Phpstorm+xdebug Breakpoint debugging PHP super easy!!!

Source: Internet
Author: User

Phpstorm version: 10.0.3

PHP Version: 5.5.12

Xdebug version: Php_xdebug-2.2.5-5.6-vc11-x86_64.dll

ps:php version and Xdebug version must be relative

1. PHP Installation Xdebug extension

PHP.ini configuration, the following configuration for reference only, the path to be replaced by their own!

[Xdebug]

zend_extension= "D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.5-vc11-x86_64.dll"

Xdebug.remote_enable = On

The following direct replication

Xdebug.remote_handler = DBGP

xdebug.remote_host= localhost//Do not write domain phpstorm configuration There can write domain name

Xdebug.remote_port = 9000

Xdebug.idekey = Phpstorm

PS: remote_handler,remote_host,remote_port These have default values, but are still recommended settings, at least know to set these parameters ~

View phpinfo~

2.PHPSTORM settings

Landlord used to use Zendstudio, just started with phpstorm very egg pain, after a period of time found to be very useful ~

1. First check the Xdebug configuration of the Phpstorm

The debug port here is consistent with the xdebug.remote_port inside the php.ini ! The default is 9000, and if the 9000 port is occupied, it can be changed to another port.

2. Set Debug.

Add a local Web server~

Www.51open.pcom is my local web server~ ~

3. Start debugging

    1. Hit the first breakpoint, SHIFT + F9 It's OK

    2. Hit The first breakpoint, check the configured debug, press next to the bug button

4. Use: now we can start debugging. , click on the button to start listening to remote debugging, when turned green indicates that the listener is successful. Let's set a breakpoint below. , see Wood has, there is wood has a very strong, can step by step, oh, F7 single Step into the function, F8 is a single step skip function. Have not understood the message oh.

Then you can break the dots at random and press the bug button to debug the program.

Phpstorm+xdebug Breakpoint debugging PHP super easy!!!

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.