# Setting up xDebug with PHPStorm and DevKinsta on Windows

**URL:** https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951
**Category:** Application Support
**Created:** [August 25, 2021, 10:02pm UTC](https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951 "2021-08-25T22:02:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ognjen\_Babic](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/ognjen_babic/32/669_2.png) [@Ognjen\_Babic](https://community.kinsta.com/u/Ognjen_Babic)
#### Post date: [August 25, 2021, 10:02pm UTC](https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951/1 "2021-08-25T22:02:02Z")

</div>

I’ve followed the guide posted by [philippstracker](https://community.kinsta.com/u/philippstracker) on this link: [Guide: How to set up Xdebug (on DevKinsta) with PhpStorm](https://community.kinsta.com/t/guide-how-to-set-up-xdebug-on-devkinsta-with-phpstorm/944)

However, I couldn’t get it to establish conneciton.

When I run `php -v` inside devkinsta\_fpm container I get:

PHP 7.4.18 (cli) (built: May 3 2021 11:27:06) ( NTS )  
Copyright (c) The PHP Group  
Zend Engine v3.4.0, Copyright (c) Zend Technologies  
with Zend OPcache v7.4.18, Copyright (c), by Zend Technologies  
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

But in settings of CLI-interpreter it says Debugger: Not Installed

My php ini from /etc/php/7.4/cli/ini.php has:

```auto
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.discover_client_host = 1
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9003

```

as well as php.ini ini /etc/php/7.4/fpm/

My /etc/php/7.4/fpm/conf.d has 20-xdebug.ini looking like this:

```auto
zend_extension = xdebug.so
xdebug.mode = develop,debug
xdebug.start_with_request=yes
xdebug.client_port=9003
xdebug.client_host=host.docker.internal
xdebug.log=/www/kinsta/logs/xdebug.log

```

Also, I’m pretty sure I’ve set up the path mappings correctly to the root of my local kinsta website:

However this is what the validation from debug returns:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/d047cefbb05eb4303071696fed6b3073348344d4.png)

Any help would be very much appreciated!

---

<div class="post-metadata">

### Author: ![philippstracker](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/philippstracker/32/638_2.png) [@philippstracker](https://community.kinsta.com/u/philippstracker)
#### Post date: [August 25, 2021, 10:30pm UTC](https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951/2 "2021-08-25T22:30:35Z")

</div>

Hey @Ognjen_Babic 🙂 Glad you came across my guide here.

From what I can see, you’re almost right. However, you use a mix of Xdebug v2 and v3 settings in your FPM ini file (the CLI ini looks right)

The following options might work:

```ini
zend_extension = xdebug.so
xdebug.mode = develop,debug
xdebug.start_with_request = yes
xdebug.discover_client_host = 1
xdebug.client_host = host.docker.internal
xdebug.client_port = 9003

```

(the last 2 lines changed)

After that, please restart the docker container to apply the changes to all php services:

`docker restart devkinsta_fpm`

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [November 10, 2021, 2:50pm UTC](https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951/3 "2021-11-10T14:50:39Z")

</div>

We haven’t heard back from you on this topic in a while. However, if you do need further assistance you can simply create a new topic on the forum. Thank you again for using DevKinsta. Let us know if you need further assistance! 👋

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [November 10, 2021, 2:50pm UTC](https://community.kinsta.com/t/setting-up-xdebug-with-phpstorm-and-devkinsta-on-windows/951/4 "2021-11-10T14:50:43Z")

</div>


