phpstorm+Xdebug断点调试PHP

运行环境:javascript

PHPSTORM版本 : 8.0.1php

PHP版本 : 5.6.2html

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

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

1. PHP安装xdebug扩展phpstorm

php.ini的配置,下面的配置仅供参考,路径要换成本身的!ide

 

zend_extension = "E:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
;
[xdebug]
;xdebug.remote_enable = off
;xdebug.profiler_enable = off
;xdebug.profiler_enable_trigger = off
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0

xdebug.auto_trace=1
;xdebug.collect_params=1
;xdebug.collect_return=1
xdebug.remote_handler = dbgp   
;xdebug.remote_autostart = 1
xdebug.remote_host= localhost

xdebug.remote_port = 19000
xdebug.remote_autostart=1
xdebug.idekey = PHPSTORM

查看phpinfo~spa

 

2.PHPSTORM设置debug

 1.首先检查phpstorm的xdebug配置3d

          这里的debug port要和php.ini里面的xdebug.remote_port相一致!默认是9000,若是9000端口被占用的话,能够改为其余端口。

 

运行环境:

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.

 

 

这是Remote Debug http://51php.xyz/2016/04/20/phpstorm.html

按F9就能够调试了   F8是单步调试  F7

 

 

 

javascript:(function(){document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()

javascript:(function(){document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()

 

IDE key :

相关文章
相关标签/搜索