# Xdebug PHP extension cannot be turned off

**URL:** https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378
**Category:** Application Support
**Created:** [July 19, 2023, 3:38pm UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378 "2023-07-19T15:38:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Julian\_MP](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Julian\_MP](https://community.kinsta.com/u/Julian_MP)
#### Post date: [July 19, 2023, 3:38pm UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/1 "2023-07-19T15:38:57Z")

</div>

Using the “ENABLE XDEBUG” toggle for a site changes the content of the php.ini from

```auto
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.profiler_enable=1

```

to

```auto
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.profiler_enable=0

```

However errors are still displayed using xdebug. Looking at the output of phpini() its shows that xdebug3 is being used. According to the phpini output those three settings are no longer in use?

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

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [July 19, 2023, 3:48pm UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/2 "2023-07-19T15:48:55Z")

</div>

Hey @Julian_MP welcome to Kinsta Community!  
We’ll make a test to see if we can replicate the issue on this side, but if you would like to try a quick workaround, you can try to disable the xdebug mode entirely.

Open docker and use the left sidebar to move into the _Containers_ tab. Once there, click on **devkinsta\_fpm** and move into the _Terminal_ tab. Write the command `phpdismod xdebug`, press enter and then click on the restart button at the top right (the circled arrow icon).

Best regards,  
Alessandro

---

<div class="post-metadata">

### Author: ![Julian\_MP](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Julian\_MP](https://community.kinsta.com/u/Julian_MP)
#### Post date: [July 20, 2023, 9:23am UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/3 "2023-07-20T09:23:19Z")

</div>

Thank you @Alessandro - very useful to have a workaround but would be really good to get a fix for this in DevKinsta if possible

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [July 20, 2023, 10:12am UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/4 "2023-07-20T10:12:08Z")

</div>

Hey Julian, can you please share what DevKinsta version you are using?  
I wasn’t able to replicate this on my machine with the latest DevKinsta version (2.11.0). I remember a similar bug being fixed some time ago, is it possible that your DevKinsta version isn’t up to date?

Regards,  
Alessandro

---

<div class="post-metadata">

### Author: ![Julian\_MP](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Julian\_MP](https://community.kinsta.com/u/Julian_MP)
#### Post date: [July 20, 2023, 10:41am UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/5 "2023-07-20T10:41:45Z")

</div>

Hi Alessandro - I installed the latest version from your website yesterday

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

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [July 20, 2023, 11:37am UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/6 "2023-07-20T11:37:48Z")

</div>

@Julian_MP can you please check something for me:

1. Go inside the site setting in DevKinsta by clicking the wrench icon, note the PHP version used and be sure that the xdebug toggle is off and the php.ini file is saved.
2. Then click on the top bar on DevKinsta, access the general settings, scroll all the way down, change the PHP Version to the one in use by your site and see if xdebug is enabled there as default package.  
If it is, uncheck that and save the setting 🤞

---

<div class="post-metadata">

### Author: ![Julian\_MP](https://avatars.discourse-cdn.com/v4/letter/j/e68b1a/32.png) [@Julian\_MP](https://community.kinsta.com/u/Julian_MP)
#### Post date: [July 20, 2023, 11:58am UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/7 "2023-07-20T11:58:52Z")

</div>

Thank you! The local site is running 8.0 and in settings the view defaults to 8.2. I selected 8.0 and debug was checked in php.ini. I unchecked it and saved the setting and it correctly disabled debug. I can toggle it on and off using the php.ini so that’s great.

Using the “ENABLE XDEBUG” however does not work. I also changed my site to run on 8.2 and the ENABLE XDEBUG toggle does not work.

The php.ini solution is fine for my needs though but would be great to get the toggle working if possible.

Many thanks for sorting the solution, much appreciated!

---

<div class="post-metadata">

### Author: ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)
#### Post date: [July 20, 2023, 1:12pm UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/8 "2023-07-20T13:12:04Z")

</div>

Glad that worked Julinan!  
I was able to replicate the issue on my side too, I’ve reported the bug to our developers. Thank you for bringing this up!

Regards,  
Alessandro

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)
#### Post date: [July 23, 2023, 1:12pm UTC](https://community.kinsta.com/t/xdebug-php-extension-cannot-be-turned-off/2378/9 "2023-07-23T13:12:24Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
