PHP开发中都说一个会偷懒的程序员才是合格的程序员,在PHP开发中调试是必须要有的,可能要重复很多次的去调试,一次又一次,今天我们就来教教大家如何偷懒的,那么就来讲讲使用phpstorm进行偷懒吧!
1、下载xdebug模块
注意:带"ts"是线程安全的意思,"nts"的他没有标示,也就是说,如果是nts的要下载没标示的,下载下来的文件名其实是有标示的。
2、把xdebug安装到php
把下载的dll拷贝到php里面的ext文件夹里(扩展dll都在这里),改名为php_xdebug.dll。
在php.ini里修改(在“Module Settings”下面添加):
`[xdebug] `
`zend_extension=php_xdebug.dll `
`xdebug.remote_enable = On `
`xdebug.remote_handler = dbgp `
`xdebug.remote_host= localhost `
`xdebug.remote_port = 9000 `
`xdebug.idekey = PHPSTORM`
在phpinfo页面查看,会有xdebug的相关信息,表示已经配置好php了!
3、配置phpstorm
语言的苍白无力,我们就直接来教程图好了




根据自己的访问地址配置服务和URL,使下面生成的url和预想的一样。
我的地址是:http://localhost:63344/works/index.php?p=admin&c=login&a=login

打了断点之后就可以开始了


大家可以自己用测试一下哦!会给你带来很大的方便的,不用一个一个的去调试了,一个断点解决了全部!!哈哈哈!就是这么懒!
以上就是使用phpstorm进行PHP断点调试的详细内容,欢迎关注作者的微信公众号!

网友评论