![]() ![]() ![]() This blog is to help me remember what I have done, hopefully teach others and get feedback and learn from others. Xdebug and PhpStorm with Laravel Sail debugs server.php only. ![]() You may be like me, having spent hours in StackOverflow trying to resolve issues with Xdebug and Chrome/ PHPStorm/ Docker.īut, after reading this article, you can see just how easy it is and start improving your local dev workflow, as well as improving performance bottlenecks before you get to production. The goal is to download the project and setup sail so it creates the. Conclusionīecause Xdebug is way easier to use than it used to be, and the debugger/ profiler are invaluable tools for local development, I think this post adds a lot of value on top of the existing documentation. You can sail down now when we are editing the docker config files. You will see the docker folder and docker-compose.yml file. ![]() Execute sail artisan sail:publish to publish the configuration files. Make sure you sail up -d before we start. I am using Laravel Sail for running the project inside a container and everything seems to work except the debugging part. This is useful for checking your configuration has loaded correctly. Let us step-by-step to add Xdebug to our project. env file and stop/ start Sail, you should see a page like the phpinfo() output. Recommended:-Laravel 8 Create JSON File & Download From Text. Updates: The new version of Larave Sail ( > v1.9.0 ) included Xdebug 3.0. This is useful for checking your configuration has loaded correctly. Laravel Sail has really been awesome in helping. There is a debate about Xdebug support in the laravel/sail repo you may take a look if you are interested. With Xdebug 3, we can use xdebug_info() to check what config Xdebug is using. With Xdebug 3, we can use xdebuginfo() to check what config Xdebug is using. ![]()
0 Comments
Leave a Reply. |