Xdebug config stopped working on new projects

I am using the latest local by flywheel i believe, when i first started the config xdebug button worked creating a /.idea folder in app/public. Now it is not doing anything. It will not create that folder on new sites and setup on new “sites”

The .idea folder is usually the result of opening the project in PhpStorm and doesn’t have anything implicitly dealing with xDebug.

When I created my first project in local by flywheel and I used the config phpstorm button in addons and i swear it created and ./idea folder in app/public. I opened that up in phpstorm and i got the “local by flywheel” in my phpstorm toolbar and then i could debug. However now no matter what i do i do I cannot repeat that process with new sites. I use the button then I open up that public directory in phpstorm and nothing happens, No “local by flywheel” in the toolbar and no ability to debug.

I just did this today and it worked. Did you go to the appropriate tab in Local and select the button to add xDebug to PhpStorm?

Yes, I did. It worked for the first site. After that it no it no longer works for any other site I create. It doesn’t seem to matter since it doesn’t stop at any breakpoints anyway. I set phpstorm to listen but nothing ever happens.

Sometimes setting the ‘Stop at first line’ in PhpStorm helps.

No, nothing i do seems to work, i am listening for the correct port i am using xdebug helper, everything is set up right, i checked php info and xdebug is there and should be working correctly, i tried the setting you suggested but nothing. I cannot get xdebug to work, i got it to work with a MAMP environment, but with local it acts as if xdebug was not installed.

@jdurnil,

Are the newly created sites using the Custom environment? Preferred doesn’t have Xdebug.

If you’re using Custom, do you see Xdebug in the phpinfo() page?

Everything is custom, no preferred, and yes i see the xdebug and all its settings in the phpinfo() page. Everything is set up correctly everywhere. xdebug on local, everything is set right in phpstorm, and using xdebug helper on chrome but nothing happens for the breakpoints, there is no communication.

Interesting! :thinking:

One thing that may be worth trying is to tell PhpStorm to listen for all debug connections. There’s a phone icon that you can click. Here’s what it looks like:

Disabled
01%20PM

Enabled
06%20PM

yes I am aware of the listen for connections buttton as I have set this up for other environments, in fact I got it working fine with MAMP this morngin. The listen for connections button is enabled and it is not working.

inistormxhelper

Thanks for the screenshots!

Can you please try validating the Xdebug setup in PhpStorm? Here’s how:

  1. Click on “Local by Flywheel” next to the Start, Stop, Coverage, and Listen buttons.
  2. Go to “Edit Configurations”
  3. Click “Validate” in the middle of the window. See the screenshot below.
  4. Go through the steps to validate the setup. Here’s what it should look like with Local.

validate

it looks like it validates fine, i just can’t understand why it won’t work

Got it, thanks for checking that!

Here’s what I’d try:

  1. Go to Chrome and disable the Xdebug Debug session
  2. Quit PhpStorm
  3. Restart the Local site
  4. Re-open PhpStorm
  5. Click on the bug icon beside “Local by Flywheel” in PhpStorm to start a debugging session directly from PhpStorm. It should pop open your default browser and append a query string such as ?XDEBUG_SESSION_START=18932. This will set a cookie. Don’t enable Debug in Chrome with the extension (yet).
  6. Make sure breakpoints aren’t muted by pressing Shift + Shift and then typing “Mute Breakpoints”
  7. Navigate around the site and test various breakpoints in PhpStorm.

Ok, i went through and did all that, breakpoints are not muted, i didn’t enable the chrome extension, restarted everything, used the “bug” icon to launch browser from phpstomr i have breakpoints all over the place, nothing worked

break

header

Thanks again for the screenshots.

I was searching around and came across this: https://stackoverflow.com/a/29174219

Based off of that, you could try changing the Xdebug port in the site’s conf/php-VERSION/php.ini file. Restart the site after making any changes in conf.