How to get Xdebug working with Visual Studio Code?

Hey @damask

I would examine any firewalls or antivirus software that is installed.

For Windows, a common thing is the built in Windows defender firewall. In general you want to allow code.exe to work on private networks because that’s how VS Code can communicate with Local’s site.

You might see a dialogue like this:

You’ll want to uncheck the Allow Visual Studio Code to communicate on “Private networks”.

In case this dialog never comes up (or was already clicked before) you can adjust the settings for the firewall. You’ll want it to look something like:

Again, you’ll want to at the very least allow it on private networks.

Other firewall software should have settings and exemptions like this, so if it isn’t Windows defender, I would start poking around any apps that might be preventing VS Code from accessing Virtualbox’s private network.

– Ben

1 Like