Home >php教程 >php手册 >Detailed graphic and text explanation of phpstorm's tutorial on configuring Xdebug to debug PHP.

Detailed graphic and text explanation of phpstorm's tutorial on configuring Xdebug to debug PHP.

WBOY
WBOYOriginal
2016-07-06 14:24:37952browse

Detailed graphic and text explanation of phpstorm configuration Xdebug for debugging PHP tutorial,

phpstorm configuration Xdebug for debugging PHP tutorial is shared with everyone, the specific content is as follows

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: The php version and the xdebug version must correspond

1. PHP install xdebug extension

Configuration of php.ini, the following configuration is for reference only, the path must be replaced with your own!

[xdebug]

zend_extension=”D:wampphp-5.6.2-x64extphp_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 all have default values, but it is still recommended to set them, at least know how to set these parameters~

View phpinfo~

2.PHPSTORM settings

The author has been using zendstudio before. It was very painful to use phpstorm at the beginning. After using it for a while, I found that it is quite easy to use~

1). First check the xdebug configuration of phpstorm

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

2). Set debug.

Add local web server~

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

3). Start debugging

After setting the first breakpoint, just shift F9

Set the first breakpoint, select the configured debug, and click the bug button next to it

Summary:

According to the breakpoint configuration, or during the process of opening the Debug URL, or after POST, if PhpStorm listens to the Debug connection, it will immediately switch to the editor interface and jump to the set breakpoint. The client will wait for PhpStorm's operation.

You can interrupt PhpStorm debugging at any time, or conveniently perform Step Into / Step Over / Run to cursor (this is tricky):

Oops, I don’t want to debug, but PhpStorm keeps popping up? Remember the phone button just now, click it again and make it red.

The above is the entire content of this article. I hope it will be helpful to everyone in learning PHP programming.

Statement:
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