I just switched from a Windows machine to a Mac, and I’m having trouble getting Xdebug to work properly on the Mac.
On both machines I’m using XDebug, php 5.6, and PHPStorm. Historically, I have set up the path mappings to go to /app/public, fired up Xdebug, and it worked without a hitch.
That’s not working on the new machine. I’ve been crawling the forums for hours trying to come up with a solution, and everything I’ve tried hasn’t worked.
I’ve tried using the “one click IntelliJ support” setting. I’ve even got the Local By Flywheel option in PHPStorm, but it behaves exactly the same now matter what I do. It just…doesn’t do anything. The site loads as-if I’m not trying to run the debugger.
I connected to the terminal via SSH on both my Windows Machine, and my Mac. I ran php -v, and noticed that the Windows machine has XDebug installed remotely, but the Mac does not. I suspect this is the source of my problem, but I have no idea how to resolve it.
@alexstandiford how’d you get it to work? I created another site (Custom) and then imported the site into it and click the Configure PHPStorm IDE and still do not see it in the Configurations.
Basically, you go to settings>>>Languages & Frameworks>>>PHP and add these directories to your include path:
/app/public/wp-content
/app/public/wp-includes
/app/public/wp-admin
/app/public
Once you do that, click Okay, and re-open settings (there’s a weird behavior in PHPStorm that prevents the servers list form updating when you add include paths).
Then go to settings>>>Languages & Frameworks>>>PHP again
Expand your include path and change it so that the absolute path on the server matches the image above, as /app/public.
Click OK, and you’re good to go.
Also, if you DID already set up the site as a preferred environment, I’m sorry but your only option is to export your current site, and re-import the same site using a custom environment. Hopefully in the future Flywheel will set it up so that “Dev Mode” enables and disables XDebug or something. It’s a real drag that i can’t use their preferred environment simply because I want to use XDebug on my local environment.