一. 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按钮跑起来就好了