图文详解phpstorm配置Xdebug进行调试PHP教程,_PHP教程

WBOY
Release: 2016-07-12 08:49:37
Original
790 people have browsed it

图文详解phpstorm配置Xdebug进行调试PHP教程,

phpstorm配置Xdebug进行调试PHP教程分享给大家,具体内容如下

运行环境:

PHPSTORM版本 : 8.0.1

PHP版本 : 5.6.2

xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll

ps : php版本和xdebug版本一定要相对应

1. PHP安装xdebug扩展

php.ini的配置,下面的配置仅供参考,路径要换成自己的!

[xdebug]

zend_extension=”D:\wamp\php-5.6.2-x64\ext\php_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 这些都有默认值,但还是建议设置下,至少知道要设置这些参数~

查看phpinfo~

2.PHPSTORM设置

楼主以前一直用zendstudio,刚开始用phpstorm非常蛋疼,用了一段时间后发现还挺好用的~

1).首先检查phpstorm的xdebug配置

这里的debug port要和php.ini里面的 xdebug.remote_port相一致!默认是9000,如果9000端口被占用的话,可以改成其他端口。

2). 设置debug.

添加本地的 web server~

www.51open.pcom 是我本地的 web server~ ~

3).开始调试

打好第一个断点,shift + F9就可以了

打好 第一个断点 ,选中配置的debug, 按旁边的臭虫 按钮

总结:

根据断点配置,或在打开 Debug URL 的过程中,或在 POST 之后,如果 PhpStorm 监听到了 Debug 连接,就会立即切换到编辑器界面,并跳转到设置的断点处,浏览器端会等待 PhpStorm 的操作。

你可以随时中断 PhpStorm 的调试,或方便的进行 Step Into / Step Over / Run to cursor(这个刁爆了):

哎呀,不想调试了,PhpStorm 却总是跳出来?记得刚刚那个电话按钮嘛,再点一下,让其变成红色,就好了。

以上就是本文的全部内容,希望对大家学习PHP程序设计有所帮助。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1136661.htmlTechArticle图文详解phpstorm配置Xdebug进行调试PHP教程, phpstorm配置Xdebug进行调试PHP教程分享给大家,具体内容如下 运行环境: PHPSTORM版本 : 8.0.1 PHP版本...
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!