How to enable xdebug variable display features with Local?

Hi,

Anyone konw that how to enable xdebug variable display features with Local? I have turned on xdebug intellij integration addons, but seems it only working with phpstorm debug, what I want is xdebug varibal display in browser when use var_dump() function.

Does this app provide any support? I ask this question 6 days ago and no reply :disappointed_relieved:

Hi @cloudstone,

Sorry for the delay!

By default, you should see enhanced var_dump() output with the Custom environment since Xdebug is already enabled.

If you wish, you can change the PHP configuration by browsing to the site’s /conf/php directory and adjusting the php.ini file accordingly.

Hi,
Thanks for the reply.

But no enhanced var_dump() output by default, and I can’t find /conf/php directory, there are only two folder under site root: app directory and logs directory.

42 PM

That’s the directory structure for Preferred. The Preferred environment doesn’t have Xdebug or easily editable configs.

Here’s what you can do to switch from Preferred to Custom:

  1. Right-click on the current site in Local
  2. Go to Export and follow the steps
  3. Drag and drop the resulting archive from step #2 onto Local’s window or Dock icon to import the site.
  4. When importing the site, select the “Custom” environment

There is no xdebug option in Custom environment.

In the Custom environment under the Settings > Advanced menu there should be a plugin to activate. I may be wrong about the specific menu, but it’s in Settings. I’m not looking at it right now.

There isn’t an option for Xdebug when setting up the site. All versions of PHP that are available in the Custom environment have Xdebug enabled by default.

Adding to what @afragen said, there’s an add-on that allows you to configure PhpStorm with one click. You can find the button in Utilities in that site’s panel in Local. If you don’t see the button you’ll need to enable the “Xdebug IntelliJ integration” add-on under Preferences » Add-ons.