Phpstorm+xdebug Breakpoint Debugging Php____php

Source: Internet
Author: User
Preface: What is Debug. I believe many programmers know the word debug, but also understand the meaning of it, but for the origin of the word, I am afraid that few people know. The origin of debug dates back to 1937 years. 1937, American youth Howard. Aiken found IBM to invest 2 million of billions of dollars in computer development, the first finished product AI Ken named it: Mark 1th (MARK1), also known as "Automatic sequence controlled computer", from this time IBM by the production of watchmaking, butcher scale, Coffee grinder, such as a mess of things, the industry officially stepped into the "computer" territory. For Mark 1th, a Harvard woman mathematician, Grace She Morey Heber, one day, when debugging the program, she failed to disassemble the relay, found that a moth was sandwiched between the contacts, thus "card" to live the machine. So, hobo Witty to the program fault collectively referred to as "bugs", the exclusion program fault called Debug, and this strange "salutation", later became the computer field of professional jargon.   Thereby debug means the meaning of the program debugging. (This article is the installation process under Windows, the Mac version of children's shoes can be viewed: mac under Phpstorm+xdebug Breakpoint debugging PHP)Official steps: Zero-configuration Web application debugging with Xdebug and Phpstorm

Operating Environment:

Phpstorm version: 8.0.1

PHP Version: 5.6.2

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

ps:php version and Xdebug version must be relative

Click to download Xdebug 1. PHP installation Xdebug Extension

PHP.ini configuration, the following configuration is for reference only, the path to change their own.

[Xdebug]
zend_extension= "D:\wamp\php-5.6.2-x64\ext\php_xdebug-2.2.5-5.6-vc11-x86_64.dll"
xdebug.remote_enable = On
Xdebug.remote_handler = dbgp   
xdebug.remote_host= localhost
xdebug.remote_port = 9000
Xdebug.idekey = Phpstorm

Ps:remote_handler, Remote_host, remote_port These all have default values, but it is recommended that, at least know to set these parameters ~

View phpinfo~

"Or use Phpstudy: Other options menu/php extension Settings/php extension/xdebug to hook up"

2.PHPSTORM Settings

The landlord has been using Zendstudio, just started with phpstorm very egg pain, after a period of time to find a pretty good use of ~

1. First check the Xdebug configuration of Phpstorm

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


Phpstorm Configuration client debugging, open Phpstorm, enter the file>settings>php>servers, here to fill out the server-side information, name fill localhost,host fill localhost, Port Fill 80,debugger Select Xdebug Enter File>settings>php>debug, see Xdebug tab, Port Fill 9000, other default into the file>settings>php >DEBUG>DBGP proxy,ide key fill in the Phpstorm,host fill Localhost,port fill out 80 points OK exit settings.

2. Set Debug.

Add a local Web server~

Www.mall.com is my local service.



3. Start debugging

Hit the first breakpoint, SHIFT + F9 is fine.

Hit the first breakpoint, select the configured Debug, and press the bug button next to

Or do not understand, OK, then see the link below:

Http://wenku.baidu.com/link?url=osFXlDZtbYW2yOxJYwKukXButWW647d2d87-d69F56FmbU1Wi7YNK-KCGcrL-car-o1U_ R2y0xkxnqozw2i87fskdmb7z9n9pzzvb1a8lrq


Problems:

Debug session is finished without being paused
It May is caused by path mappings misconfiguration or not synchronized Local and remote projects.
 To figure out the problem check path mappings configuration for ' www.test.com ' server at php| Servers or enable break at the in-line PHP scripts option (from Run menu).

No interruption points or debugging is not monitored, encounter this problem, see the path configuration is the right to access the

This article address: http://blog.csdn.net/ty_hf/article/details/50768702

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.