# Xdebug + PhpStorm add-on doesn't work

**URL:** <https://community.localwp.com/t/xdebug-phpstorm-add-on-doesnt-work/26404>\
**Category:** Xdebug + PhpStorm\
**Tags:** phpstorm, xdebug, add-on\
**Created:** [July 8, 2021, 2:59pm UTC](https://community.localwp.com/t/xdebug-phpstorm-add-on-doesnt-work/26404 "2021-07-08T14:59:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dashaluna](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/dashaluna/32/13552_2.png) [@dashaluna](https://community.localwp.com/u/dashaluna)\
**Post date:** [July 8, 2021, 2:59pm UTC](https://community.localwp.com/t/xdebug-phpstorm-add-on-doesnt-work/26404/1 "2021-07-08T14:59:31Z")

</div>

Hello,

(NB: I’ve edited the description of the issue as I got feedback it wasn’t clear, hope this one is better).

I’d like to use PhpStorm’s zero configuration debugging as described here [Zero-configuration debugging | PhpStorm Documentation](https://www.jetbrains.com/help/phpstorm/zero-configuration-debugging.html) I had it set up a while ago and I know it works.

However, when I listen to PHP debug connections and load the site, I get the following error/screen and I don’t know what to do here, why it breaks on that script:

 ![Screenshot 2021-07-09 at 09.44.06](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/c/c4887212e10c0bde96e01679ced61f30dc514cae.png)

Here are the details of the site I’ve pulled to my machine via localwp from wpengine, note it’s `https`:

 ![Screenshot 2021-07-09 at 09.51.15](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/e/e9362429e7268544a1253ad202aeac4b50dae93d.png)

Here is the server I’ve added in PhpStorm preferences and it validates via “Validate Debugger Configuration on Web Server”:

 ![Screenshot 2021-07-09 at 09.51.52](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/4/47caf2c6e68abc3f1d3880d9767bdebbf50686fd.png) ![Screenshot 2021-07-09 at 09.52.25](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/c/c13d29267197e609ed5503fe56f52c38b06274f8.png)

And there are my Xdebug preferences:

 ![Screenshot 2021-07-08 at 15.47.06](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/4/4a85dbeb3b8ce4cc33acfffbfd875ee249350561.png)

Does anyone know what’s going on and how to fix it?

**This also happens when using Xdebug + PhpStorm add-on provided by localwp app**. I’ve added run configuration via localwp app and here are the settings that I see (below). Note it doesn’t recognise it as `https`.

 ![Screenshot 2021-07-09 at 09.56.38](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/0/06ec8c06056d8b682e50c6ebf9ee0a49f02d7d90.png) ![Screenshot 2021-07-09 at 09.56.57](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/3/30ec597dea93c19971278eb224c1290d8b4980f2.png) ![Screenshot 2021-07-09 at 09.57.16](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/d/da0fd03632ba12dd3f194dae26fc84159ed3bbf1.png)

When I run Debug “Local” it still breaks on the same script:

 ![Screenshot 2021-07-09 at 09.58.26](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/6/6c7173e59181501152301ca26a2de448bdb02f0b.png) ![Screenshot 2021-07-09 at 09.59.43](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/1/1964d9b4bb594dbb22dbcdcdab5a53355ee5ca4e.png)

Versions:

PhpStorm v2021.1  
localwp v6.0.0 (but also didn’t work in the previous version)

Any idea what’s going on here and how to fix it, please? I’d really appreciate any help, thank you! 🙏

---

<div class="post-metadata">

**Author:** ![ben.turner](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/ben.turner/32/5366_2.png) [@ben.turner](https://community.localwp.com/u/ben.turner)\
**Post date:** [July 9, 2021, 9:43pm UTC](https://community.localwp.com/t/xdebug-phpstorm-add-on-doesnt-work/26404/2 "2021-07-09T21:43:31Z")

</div>

Thanks for posting all of this and making use of Local and Xdebug!

That script is what Local uses to help define the `WP_ENVIRONMENT_TYPE` variable. There’s more discussion about this in the following topic along with some adjustments that can be made to prevent this PHPStorm from breaking on this file:

> **[Local-bootstrap.php is triggering a breakpoint when XDebug is enabled](https://community.localwp.com/t/local-bootstrap-php-is-triggering-a-breakpoint-when-xdebug-is-enabled/22229)**
>
> I just wanted to post a solution to this issue in case anyone else is using PHPStorm and experiences it. What’s happening is that after the latest update to Local (5.7.5+4909) there is now a file that Local is using that is outside the WP...

If it interests you, you can also upvote this feature request to remove this file:

> **[Don't define WP\_ENVIRONMENT\_TYPE](https://community.localwp.com/t/dont-define-wp-environment-type/24587)**
>
> Issue Summary If other plugins define the constant WP\_ENVIRONMENT\_TYPE then a PHP warning is displayed as the constant is already defined. I develop plugins that allow the user to change this setting and having this define in the...
