Home > Backend Development > PHP Tutorial > phpstorm configures Xdebug for debugging PHP tutorial

phpstorm configures Xdebug for debugging PHP tutorial

WBOY
Release: 2016-07-29 09:09:51
Original
949 people have browsed it

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 be consistent Corresponding to the configuration of

  1. PHP installation xdebug extension

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 to set these parameters~

Check phpinfo~

phpstorm configures Xdebug for debugging PHP tutorial

2.PHPSTORM settings

The poster 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

Here The debug port 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 other ports.
phpstorm configures Xdebug for debugging PHP tutorial

phpstorm configures Xdebug for debugging PHP tutorial

  1. Set debug.
    phpstorm configures Xdebug for debugging PHP tutorial

phpstorm configures Xdebug for debugging PHP tutorial

Add local web server~

www.51open.pcom is my local web server~ ~
phpstorm configures Xdebug for debugging PHP tutorial

phpstorm configures Xdebug for debugging PHP tutorial

phpstorm configures Xdebug for debugging PHP tutorial

3. Start debugging

Put the first breakpoint, just shift + F9
Put the first breakpoint, select the configured debug, and press the bug button next to it
phpstorm configures Xdebug for debugging PHP tutorial

The above introduces the tutorial on how to configure Xdebug in phpstorm to debug PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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