How to debug the app use framework laravel:
- Start the app by command:
php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 artisan serve - In PhpStorm: click menu Run/Start listening for Php debug connections
- In php.ini: add lines:
[Xdebug]
zend_extension="E:/AppServ\php-7.2.29\ext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req
xdebug.remote_handler="dbgp"
;xdebug.idekey="netbeans-xdebug"
xdebug.idekey="PHPSTORM" - In Chrome: install addons Xdebug helper and config such as picture below
- Run the app in Chrome and debug normal
No comments:
Post a Comment