PHPstorm和Xdebug结合实现PHP断点调试
首先必须安装Xdebug,Xdenug的下载地址https://xdebug.org/download.php,根据自己的PHP版本进行下载,
下载完之后配置PHP.ini,在最后面添加
[xdebug]
zend_extension = "你的路径/php5.4.3/ext/php_xdebug-2.2.3-5.4-vc9-nts-x86_64.dll"
xdebug.idekey=PhpStorm
xdebug.remote_enable = On
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
完毕之后重启apache 打印phpinfo();
已经安装成功.
接下来打开PHPstorm
找到File->Setting->Lauguages&Frameworks->PHP->Debug
在自己的项目里面随便打个断点,例如:
就会把断点之前的内容显示出来,信息相当全乎啊。
还没有评论,来说两句吧...