编什么程

phpstorm断点调试

2018-12-18  本文已影响0人  沙蒿同学

百度有很多这样教程的博客,我今天就自己看着他们的教程一步步来,以下是自己的步骤:

安装phpXdebug扩展

注意要点:
1、Xdebug版本选择
2、php.ini 配置
zend_extension自己dll文件绝对路径
remote_port=9000 端口与phpstorm设置的一致
remote_autostart=1 自动开启(一定要)

[Xdebug]
zend_extension =C:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext\php_xdebug-2.6.1-7.0-vc14-nts.dll
xdebug.collect_params = 1

xdebug.collect_return = 1

xdebug.auto_trace = 0

xdebug.profiler_enable = 0

xdebug.max_nesting_level = 1000000

xdebug.remote_enable = 1

xdebug.remote_host = localhost

xdebug.remote_port = 9000

xdebug.remote_handler = dbgp

xdebug.idekey = netbeans-xdebug

xdebug.remote_autostart=1

浏览器安装Xdebug扩展程序

可以选择在google和火狐上下载相应的扩展程序(google可能要翻墙?)

配置phpstorm Xdebug

注意事项:
1、端口与php.ini一致
2、当报错“ Please configure PHP Interpreter to use built-in web server”时,记得添加php服务

打开phpstorm监听、运行

一般打开后会弹出一个默认浏览器,url地址会出现类似“?_ijt=rrcoujae241qpqhg1p6oh9kbjh”,然后你改下前面的访问地址就可以了。
例如:
http://localhost:63342/xxx/xxx/xxxxxx/controllers/OrderController.php?_ijt=rrcoujae241qpqhg1p6oh9kbjh
变为:
http://localhost/order/orderlist?_ijt=rrcoujae241qpqhg1p6oh9kbjh
可能有设置可以改为直接点击调试的,但我还没不清楚怎么能,如果你们知道怎么设置,请一定要告诉我哦。

上一篇 下一篇

猜你喜欢

热点阅读