Phpstorm+xdebug Debug Graphics Tutorials and parsing wamp php.ini settings do not take effect

Source: Internet
Author: User
Tags learn php php server php debug vc9

This article is mainly for everyone in detail introduced the Phpstorm+xdebug debugging graphics and text tutorials, the content is very rich, with a certain reference value, interested in small partners can refer to

The author's development environment is as follows: Windows8.1+apache+phpstorm+xdebug+firefox (XDebug helper 1.4.3 plugin).

First, Xdebug installation configuration

(1) Download xdebug:http://www.xdebug.org/must download the version that matches the PHP installed on the machine. The specific download method is as follows: Copy the source code of the Phpinfo Web page to http://www.xdebug.org/find-binary.php and follow the instructions to install it. As shown in the following:




(2) Install xdebug follow the download "Php_xdebug-2.3.2-5.4-vc9.dll" and copy it to the d:\php\ext\ directory.

(3) Configure Xdebug to open D:\php\php.ini, add the following code at the end:

[Xdebug]
Zend_extension = D:\php\ext\php_xdebug-2.3.2-5.4-vc9.dll
Xdebug.remote_enable =1
Xdebug.remote_handler = "DBGP"
Xdebug.remote_host = "localhost"
Xdebug.remote_mode = "req"
Xdebug.remote_port = 9000

Restart Apache.

(4) Verify the installation is successful

Detection Method 1: In the Phpinfo Web page, the ability to retrieve the xdebug words, the installation was successful, as shownin: (This failure is due to the WAMP environment is loaded in Apache inside the php.ini)


Detection Method 2:(here is shown because in the terminal environment loading is PHP inside the php.ini)

Enter php-m under CMD and you can see that the Xdebug configuration is successful. As shown in the following:


Second, phpstorm in the Xdebug configuration in the "File", "Settings", "Languages & Frameworks", "PHP" setting:

(1) Configure PHP server to find "Servers", the configuration entry is as follows: Name:localhosthost:localhostport:80debugger:xdebug as shown:

(2) Configure PHP debug to find "Debug", Xdebug in the debug port fill 9000, other default. As shown in the following:

Third, the configuration of Xdebog helper plugin in Fireforx

(1) Install the Xdebug helper plugin as shown:

(2) Configure the Xdebug helper plugin in, click "Options", and then configure as follows: IDE key:phpstormdomain filter:

localhost as shown:

Four, the use of Xdebug debugging methods and procedures

(1) Open Debug Monitor in Phpstorm Click on the phone-like icon to turn on debug monitoring, as shown in:

(2) Open Xdebug Helper plugin in Chrome browser

method One: in the Address bar, click the bug, select Debug, as shown in:

method Two: Use the shortcut key: Ctrl+shift+x to configure.

(3) Set breakpoints in Phpstorm Click on the line after the line number to set the breakpoint.

(4) Breakpoint debugging and then booting to the corresponding breakpoint in the browser method can be automatically broken down, as shown in:

In the red box, there are all the breakpoint handling methods and shortcut key hints.

The above is the whole content of this article, I hope you learn PHP debugging tutorial helpful.

Loading Xdebug in one-click Integrated Environment Wamp Why not succeed, the main reasons are as follows:

Have you ever had this experience when you opened Wamp's php.ini and made a parameter change. Back to the command to run your PHP script, but found that your settings actually do not take effect?

If this is the case, then you have to understand the PHP two running environment, one at the command terminal, one on the server (here also subdivision cgi,fast-cgi,web module mode)!

When we run our PHP script as a script, for example, I will install Wamp on D-Disk here. The D:\wamp\bin\php\php5.xx\php.ini is loaded in Wamp, and when the Apache server is running, it becomes D:\wamp\bin\apache\Apache2.2.21\bin\ PHP.ini, you can see that these two ways to load the php.ini are not the same!

If you do not find these two, you can install Wamp in the drive letter, enter the Wamp folder, and then search for ' php.ini '.

We usually modify the php.ini on the Apache server.


Let's take a look at the configuration file information below the command line to verify our claim. This is consistent with what we said earlier, and when you need to load a library so that your script can run, you can enter the command in the terminal.

Server aspects. We're only going to use phpinfo.php to see

<?php phpinfo ();?>

Then we look for the "php.ini" location, you can see the following content!

So we know, and to the above this path, it should be compiled at the time of the line hard code, the following is the result we find the php.ini file under C:\windows

In summary, we can know that wamp this suite has two php.ini, respectively, for the command line and Apache server to provide configuration information. We have to change according to their own operating conditions! Http://www.mamicode.com/info-detail-515942.html

Phpstorm+xdebug Debug Graphics Tutorials and parsing wamp php.ini settings do not take effect

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.