In PHP Monitor, this is under Manage Services and Restart Service: php. Next, restart PHP using PHP Monitor (or whatever service you’re using in the terminal). Then open the file with whatever editor is convenient and make sure it includes the following:ĭon’t worry about changing the idekey or anything like that it’s fine as-is. $ touch /opt/homebrew/etc/php/7.4/conf.d/ext-xdebug.ini Do this by issuing the following command: At this point, running $ php -v should show that Xdebug is installed.Īfter that, make sure that ext-xdebug.ini exists in the proper directory. This is going to kick off a process that will install Xdebug and set up the module in PHP. On my machine, it’s located in in the terminal, install $ pecl install xdebug. Since it’s part of the binaries installed with PHP via Homebrew, then it should be available. PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions. Install Xdebugįirst, make sure that PECL is installed by running $ which pecl in your terminal. These packages aren’t necessarily required (well, PHP is but the version and how its installed may vary □) but I’ll be using them for walking through the rest of this post. In this post, I’m assuming you’re working with: This is how you can set up Xdebug with a Homebrew-based configuration and Visual Studio Code. If you follow the steps I’ve outlined starting in the previous post, it’s relatively easy though it still requires a little bit of manual work to get started. Though I’ve recently become a fan of using Ray ( 1, 2) for much of my lightweight debugging, this doesn’t mean I don’t think it’s important to have Xdebug installed and configured in Visual Studio Code. TL DR: This is everything that needs to be done to install Xdebug with a Homebrew-based environment and to work with the software within Visual Studio Code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |