For this video, we are going to learn how to set up Xdebug with VSCode running a local server on Nitro.
For this video, we are going to learn how to set up Xdebug with VS Code running a local server on Nitro. Xdebug runs on the server, as a PHP extension, so the first thing we need to do is enable Xdebug in our Docker container that is managed by Nitro.
Fortunately, Nitro already has support for this and a command we can to toggle Xdebug on and off. This is how we can set whether we are in debug mode or not.
$ nitro xon
This enables Xdebug so it is running as a PHP extension. Now it will be available to call back to our IDE on port 9000 when it receives a HTTP request.

I am the creator of CraftQuest, a web developer, and former software team manager. I spend most of my time improving CraftQuest with code and courses. When I'm not in front of the computer, I spend my time with my family, and running on the roads and trails of Austin, TX.