# Xdebug Support: PHP debugging

**URL:** https://community.kinsta.com/t/xdebug-support-php-debugging/71
**Category:** Feature Requests
**Created:** [January 18, 2021, 2:58pm UTC](https://community.kinsta.com/t/xdebug-support-php-debugging/71 "2021-01-18T14:58:26Z")
**Posts on this page:** 1
**Showing post:** 56

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [June 15, 2022, 11:49pm UTC](https://community.kinsta.com/t/xdebug-support-php-debugging/71/56 "2022-06-15T23:49:54Z")

</div>

Hi @sonicviz and @jscotti, I agree that from a PHP development standpoint this is an important feature. I’m assuming when the Roadmap was finalized, basic web design needs were prioritized based on our surveys, interviews and forum engagement. I have notified our developers about this issue and spent a good deal of time figuring out how to get this work. Hopefully this works for everyone:

I based my setup on @sonicviz 's [findings](https://community.kinsta.com/t/xdebug-support-php-debugging/71/35) and [this post](https://dev.to/jackmiras/xdebug-in-vscode-with-docker-379l). For some reason, using `host.docker.internal` no longer works and I had to use my ip address. I don’t know if that’s due to a DK change or a Docker one. I also changed the `x.debug.idekey` to “docker” but I’m not sure if that makes a big difference or not. Another setting I added was `xdebug.discover_client_host=true`.

Below is my working configuration for Windows 10, WSL2:

**/etc/php/7.4.fpm/conf.d**

```auto
zend_extension=xdebug.so
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9003
xdebug.idekey = "docker"
xdebug.client_host = <my ip address>
xdebug.log = /var/log/php/xdebug.log
xdebug.discover_client_host=true

```

**Finding your IP address:**

Mac:

```auto
ipconfig getifaddr en0

```

Windows (run command within WSL):

```auto
grep nameserver /etc/resolv.conf | cut -d ' ' -f2

```

Linux:

```auto
hostname -I | cut -d ' ' -f1

```

My launch.json still matches what has been [shared](https://community.kinsta.com/t/xdebug-support-php-debugging/71/35).

Tested and working when viewing my WP Homepage:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/3/350fb49c459566afcea0505ade204721d3cf9b56.png)

So based on my many hours of troubleshooting, I think the issue that has popped up can be resolved by editing the xdebug config/restarting that container. Please let me know if this doesn’t work for you and I can put together a more in-depth guide. My goal here was to reproduce the issue and provide a solution while we wait for the DevKinsta update.

---

_[View the full topic](https://community.kinsta.com/t/xdebug-support-php-debugging/71)._
