# 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:** 35

<div class="post-metadata">

### Author: ![sonicviz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/sonicviz/32/391_2.png) [@sonicviz](https://community.kinsta.com/u/sonicviz)
#### Post date: [April 9, 2021, 3:21am UTC](https://community.kinsta.com/t/xdebug-support-php-debugging/71/35 "2021-04-09T03:21:14Z")

</div>

I took another stab at it and got DevKinsta Xdebug working. I used my XDebug 3 config from Devilbox.

The following is for an example WordPress install, testing by breakpointing the index.php in the root directory of “YourSiteName”. Running on PHP 7.4, change as appropriate for other versions.

Pull up a windows terminal, then:

Install XDebug into DevKinsta Php if needed:  
docker exec devkinsta\_fpm bash -c “apt-get update;apt-get -y install php7.0-xdebug php7.1-xdebug php7.2-xdebug php7.3-xdebug php7.4-xdebug php8.0-xdebug”  
docker restart devkinsta\_fpm

then

docker exec -it devkinsta\_fpm bash  
cd /etc/php/7.4/fpm/conf.d  
nano 20-xdebug.ini

Edit it to:  
zend\_extension=xdebug.so  
xdebug.mode = debug  
xdebug.start\_with\_request = yes  
xdebug.client\_port = 9003  
xdebug.idekey = VSCODE  
xdebug.client\_host = host.docker.internal  
xdebug.log = /var/log/php/xdebug.log

save, exit back to windows terminal prompt

docker restart devkinsta\_fpm

.vscode launch.json

```
{
  "version": "0.2.0",
  "configurations": 
[
    {
      "name": "Xdebug for Project YourSiteName",
      "type": "php",
      "request": "launch",
      "port": 9003,
      "pathMappings": {
        "/www/kinsta/public/YourSiteName": "${workspaceRoot}"
      }
    },

    {
      "name": "Launch currently open script",
      "type": "php",
      "request": "launch",
      "program": "${file}",
      "cwd": "${fileDirname}",
      "port": 9003
    }
  ]
}
```

---

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