If you’re looking to set up a different environment (or would like to see a video), take a look here. Xdebug 3.0 has now been released, and some changes have been made to this guide to reflect this change. This is both for myself for future reference, and for anyone who stumbles upon this post and finds it helpful. Left gutter of the line you want to break at.After watching a stream where Matt Stauffer and Derick Rethans (the creator of Xdebug) discussed setting up Xdebug with Visual Studio Code, I decided it might be helpful to write a post on setting up Xdebug with PhpStorm, specifically if you’re running Laravel Valet. Run will just… run the code.Īlso, remember to set at least one breakpoint, or your debugging journey will end quite quickly. Knowing PHPStorm, there’s probably 10 more ways to do it. Or, Run > Debug 'Your Configuration', or Run > Debug 'Your Configuration', or the keyboard shortcut for it.įor me it’s ^D to run the latest debug configuration. and choose the configuration you just created. Run the debuggerįinally! What you can do now is go to Run > Debug. Or, just keep editing that configuration every time. Rinse and repeat for every URL you want to debug on. The start URL should be whatever URL you want to run the debugger on.In the Server dropdown, select the server you just created.Add a new PHP Web Application and name it whatever.The host should be your dev domain, like: v.Open Preferences > Languages & Frameworks > PHP > Servers.I was too.įirst, create a server that PHPStorm will use to whip open a debug session in the browser: However if you haven’t Xdebugged before, you might be scratching your Set up the app for debuggingĪt this point, Xdebug should be good to go. If you don’t uncheck those checkboxes, the debugger will stop on Valet’s server.php every time. In the Xdebug section, Debug Port should be 9001 (like you set in php.ini earlier).Open to Preferences > Languages & Frameworks > PHP > Debug.Obligatory screenshot of what you just read #1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |