DrupalPod icon indicating copy to clipboard operation
DrupalPod copied to clipboard

Xdebug don`t working

Open kholizen opened this issue 3 years ago • 4 comments

Describe the bug

To Reproduce

Expected behavior

Screenshots

Version and configuration information (please complete the following information)

  • Issue page
  • Issue branch
  • Drupal core version
  • Project type
  • [ ] Core
  • [ ] Module
  • [ ] Theme

Additional context

kholizen avatar Feb 11 '22 14:02 kholizen

A few notes about getting XDebug to work when using Jetbrains Gateway:

  • It is necessary to provide mappings for a symlinked project. When working with Drupal core, I had to add a mapping for /var/www/html/repos/drupal/core to its location in the project. You can get to this through PHP > Servers. I recommend turning on debugging, listening for a connection, setting a breakpoint (or turning on the setting to break at the first line), and then refreshing a page in the browser. The connection will be detected and you'll have the opportunity to add the server at that point.
  • To get drush working with xdebug, I had to manually add a server called drupalpod.ddev.site.
  • I also needed to map /var/www/html/vendor/bin/drush to its location in the project in the new server added in the previous step.

It would be nice to get some default configuration hooked up for this, since I think it can be read from the project. Maybe this is what will happen in #23.

pyrello avatar Dec 02 '22 14:12 pyrello

@pyrello Thank you for opening the issue!

I don't use PHPStorm often, but I'll be happy to add any changes necessary to support it better. That PR is over 1 year old now, if you can help me test it, we can merge it or improve it if needed.

shaal avatar Dec 03 '22 04:12 shaal

@shaal I just did a quick review of it and I think I would probably just start from scratch. It seems like there may be some things in there that are too specific to a particular project. I'll have to look into how to effectively share elements from the .idea folder a bit more, since that is kind of new to me. I would like to figure out how to get this working since it would make the experience of using it with Jetbrains Gateway a lot smoother.

pyrello avatar Dec 04 '22 20:12 pyrello

Dropping this here for reference later: https://www.jetbrains.com/help/idea/sharing-your-ide-settings.html

pyrello avatar Dec 04 '22 20:12 pyrello