Phpstorm+xdebug Debug Graphics tutorial, _php tutorial

Source: Internet
Author: User

Phpstorm+xdebug for debugging and graphic tutorials,


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 download address: 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 that the installation is successful detection Method 1: In the Phpinfo Web page, the ability to retrieve the xdebug words, the installation was successful, as shown in:

Detection Method 2:

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.

http://www.bkjia.com/PHPjc/1136660.html www.bkjia.com true http://www.bkjia.com/PHPjc/1136660.html techarticle phpstorm+xdebug Debug Graphics tutorial, the author's development environment is as follows: Windows8.1+apache+phpstorm+xdebug+firefox (XDebug helper 1.4.3 plugin). One, Xdebug installation configuration (1) ...

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