简体   繁体   中英

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. 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.

Can someone suggest a better way to handle this?

I solved this issue by adding the following to my xdebug.ini file

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM