[英]Debugging Laravel with Xdebug in IntelliJ IDEA/PhpStorm with artisan serve command
I am trying to figure out how to properly debug a Laravel controller using the artisan serve
command.我想弄清楚如何使用
artisan serve
命令正确调试 Laravel controller。 It seems in Laravel 8+ the serve command calls pcntl_proc
and creates a sub-process, the breakpoints that are inside the sub-process are not captured by both IDEA and PhpStorm.似乎在 Laravel 8+ serve 命令调用
pcntl_proc
并创建了一个子进程,子进程内的断点没有被 IDEA 和 PhpStorm 捕获。
Can someone suggest a better way to handle this?有人可以建议更好的方法来处理这个问题吗?
I solved this issue by adding the following to my xdebug.ini file我通过将以下内容添加到我的 xdebug.ini 文件中解决了这个问题
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.client_port=9003
xdebug.start_with_request=yes
xdebug.output_dir=/tmp
pcntl process picks up these values and process debuging normally pcntl 进程获取这些值并正常进行调试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.