Can't get xdebug setup on Windows

Hello everyone,

I’ve been trying to get Xdebug set up on my new Windows machine, but I’m having no luck. Would someone mind helping me out here. On my mac there was a setting for setting up PHPStorm with XDebug, but I’m not seeing that any where in the Windows version. I’ve tried pointing PHPStorm to the php.ini files, but it doesn’t see a copy of xdebug set up with any of them. So I’m not sure what else to do.

Hi @KennySD,

The Preferred environment doesn’t have Xdebug installed by default. If you need Xdebug then be sure to select the Custom environment when spinning up the site. :smiley:

If you already have a Preferred site and need to move to Custom, you can do so by exporting the site from Local and then re-importing it with the desired settings.

Hey @clay,

Thanks for the response, I’m using a custom environment currently and I’m still not seeing the xdebug option. Any other ideas of what could be causing the issue? I have a co-worker who is using a Windows machine as well, they are also using a custom environment, they are not seeing the option either. Is xdebug an add-on maybe?

Ah, yes! It is indeed an add-on but it should be automatically enabled.

If it’s not, you can go to Preferences » Add-ons and enable “Xdebug IntelliJ integration”. Then, if you click back onto a site in Local you should see a button in the “Utilities” tab that says “Configure PhpStorm and IntelliJ IDEs”.

Once you click that button a profile will be created in the app/public directory.

@clay,

It appears I do not have that add-on and looking around on Google, I’m not finding it. Would you mind pointing to where I can download the add-on?

I also tried uninstalling and reinstalling on my Windows machine last night and I’m still not seeing the Xdebug add-on setting. I looked on a co-workers mac and the option is on their machine. I tried to see if there would be a way to export the add-on from their machine, but we are not anything in the add-ons folder. I’m kind of at a loss on what to do next.

1 Like

I am also not seeing the xdebug addon on Windows. Is there a solution to this?

Also on Windows, and also not seeing the button.
Worst than that, although php.ini and php_info() output all the correct configurations for having xDebug working, and after trying to manually configure phpstorm, vscode and chrome xdebugger helper extension to try to do debugging, I cannot get a connection in any of the cases :frowning: A real frustrator as I already lost quite some hours trying to get this working correctly :frowning:

Would more than appreciate some help here :slight_smile: Cheers!

Hey @paulotruta

Usually if everything appears to be setup correctly, but things are working, it’s something in the networking layer that is preventing communication – think Firewall, or antivirus.

Have a look at this topic for a little more info on it: How to get Xdebug working with Visual Studio Code?

– Ben

1 Like

Hey there.

During the afternoon I was thinking more something along the lines of “port is not exposed”, but after setting up rules in the Firewall and taking out PHPSTORM I made it work there, which means that Local is not the culprit!

Now I can retry the VSCode configuration :wink:

Thank you for the tip!

EDIT: VSCode also works… awesome :slight_smile:

1 Like

Nice! I’m glad you got it figured out!

– Ben