Does anyone have a How To on setting up Xdebug (using Local by FlyWheel) with the Atom editor?
I’m on Mac OS X Sierra, but I doubt that it would matter.
Thank you in advance,
Daniel
Does anyone have a How To on setting up Xdebug (using Local by FlyWheel) with the Atom editor?
I’m on Mac OS X Sierra, but I doubt that it would matter.
Thank you in advance,
Daniel
Hey Daniel,
With PhpStorm the main part of the puzzle is the path mapping. It maps the path from the site’s app/public
folder to simply /app/public
(what PHP in the Docker container sees).
It looks like php-debug
for Atom has a similar PathMaps
option.
Hello clay!
I have configured the PathMaps
option like you suggested:
"php-debug":
PathMaps: [
"remotepath;localpath"
"/app/public;/Users/my_user/www/my_site_folder/app/public"
]
ServerAddress: "127.0.0.1"
ServerPort: 9000
but my breakpoints are still ignored.
A similar configuration works fine in Visual Studio Code, so maybe it’s some incompatibility between Local’s XDebug settings and what is expected by Atom’s php-debug extension?
Thanks!
Adriano
I’ll have to look into Xdebug + Atom sometime.
In the meantime, you can always tweak the php.ini
file in the site’s conf/php/VERSION
folder and adjust the Xdebug settings. Let me know what you find out!
Also, one thing you may want to try is removing the ServerAddress
and ServerPort
options from the JSON above.
Trying to do this too … @adrianogiannacco did you solve this?
I notice someone has it working with VSCode already which is a total rip-off of very similar to Atom:
which i’m able to get working (though had to change the path mapping) … so it’s not the Local side causing the issue in Atom …
What problem are you running into with Atom? I tried setting up the PHP debugger in it with the following packages. I also use the Chrome Xdebug helper Extension.
Unfortunately, I was never able to get the breakpoints to work even with the path mapping configured. If I used xdebug_break();
it would properly break.
See Working bad since last updates · Issue #294 · gwomacks/php-debug · GitHub
Same issue, Clay … having got this to work with VSC has solved my ultimate problem though - I was able to determine that PHP 7.1 is causing an old add-in to break so have reverted my Local install to an older version of PHP (5.6) (great feature!) and that cleared the problem.
I may revert to trying to get Atom working at a later stage and edit this post if I make progress …