laravel 使用xdebug进行调试

一. xdebug配置

[xdebug]
zend_extension="xdebug.so"
xdebug.remote_enable = 1
xdebug.mode = debug
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_mode = "req"
xdebug.remote_port = 9003
xdebug.client_port=9003
xdebug.client_host="localhost"
xdebug.idekey = "PHPSTORM"

二. phpstrom配置

如图
在这里插入图片描述
在这里插入图片描述
创建一个php script,并按照如图填写artisan的路径及运行的port为9003(与xdebug对应)

在这里插入图片描述
在这里插入图片描述
创建一个cli interpreters

然后在你想要断点的地方断点
然后再按debug按钮跑起来就好了在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u010775335/article/details/128445185