PHPStorm XDebug for debugging, phpstormxdebug_PHP tutorial

WBOY
Release: 2016-07-12 08:50:25
Original
1014 people have browsed it

PHPStorm XDebug for debugging, phpstormxdebug

The author’s development environment is as follows: Windows8.1 Apache PhpStorm XDebug Firefox (XDebug helper 1.4.3 plug-in).

1. XDebug installation configuration

(1) Download XDebug Download address: http://www.xdebug.org/ You must download a 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 then install it according to the instructions. As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王

PHPStorm XDebug进行调试 - 王丽兵 - 老王

(2) Install XDebug Download "php_xdebug-2.3.2-5.4-vc9.dll" as shown above and copy it to the d:phpext directory. (3) Configure XDebug Open d:phpphp.ini and add the following code at the end:

[Xdebug]
zend_extension = d:phpextphp_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 whether the installation is successful Detection method 1: In the phpinfo web page, if you can retrieve the word XDebug, the installation is successful, as shown in the following figure: PHPStorm XDebug进行调试 - 王丽兵 - 老王

Detection method 2:

Enter php -m under cmd, and you can see that XDebug indicates that the configuration is successful. As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王 2. XDebug configuration in PHPStorm In the Settings of [File]->[Settings]->[Languages ​​& Frameworks]->[PHP]: (1) Configure PHP Server Find [Servers], the configuration items are as follows: Name: localhost Host: localhost Port:80 Debugger:XDebug As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王(2) Configure PHP Debug Find [Debug], fill in the Debug Port in XDebug with 9000, and default to other values. As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王 3. Configuration of XDebog helper plug-in in Fireforx (1) Install the XDebug helper plug-in As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王

(2) Configure XDebug helper plug-in In the picture above, click [Options] and configure as follows: IDE key: PhpStorm Domain filter: localhost As shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王 4. Debugging methods and steps using XDebug (1) Turn on Debug monitoring in PHPStorm Click on the phone-like icon to turn on Debug monitoring, as shown in the figure below: PHPStorm XDebug进行调试 - 王丽兵 - 老王 (2) Turn on the XDebug helper plug-in in the Chrome browser Method 1: In the address bar, click on the bug and select Debug, as shown below: PHPStorm XDebug进行调试 - 王丽兵 - 老王 Method 2: Use the shortcut key: CTRL SHIFT X to configure. (3) Set breakpoints in PHPStorm Click in the blank space after the line number to set a breakpoint. (4) Breakpoint debugging Then the method directed to the corresponding breakpoint in the browser will be automatically broken, as shown in the following figure: PHPStorm XDebug进行调试 - 王丽兵 - 老王

There are all breakpoint processing methods and shortcut key prompts in the red frame.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1133412.htmlTechArticlePHPStorm XDebug for debugging, phpstormxdebug The author's development environment is as follows: Windows8.1 Apache PhpStorm XDebug Firefox (XDebug helper 1.4. 3 plug-ins). 1. XDebug installation configuration (1)...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!