Closed weitzman closed 9 years ago
Hi weitzman. Thanks for your suggestions and input over the past few days. I've been busy at work and conferences recently so I haven't had much time to look into the issues you've been having. I'll take a look at your issues as soon as I can, hopefully this week :) Thanks! Phil
Note to add these instructions to the documentation: http://vlad-docs.readthedocs.org/en/latest/applications/xdebug/
https://github.com/hashbangcode/vlad-docs/blob/master/applications/xdebug.md
This is the way I do it - in my case I use PHPStorm, and I configure the debugging connection to point to the hostname. Works every time. I cannot speak for other IDEs, but PHPStorm is very well integrated with XDebug. You can add a IDEKEY, I tend to use PHPSTORM, and use the XDebug bookmarklets to trigger xdebug to start or stop.
https://www.jetbrains.com/phpstorm/marklets/
The only path mapping I need to do is telling PHPStorm where the docroot is on the VM, which is quite simple in Vlad (/var/www/site/sitename).
This setup literally takes less than 30 seconds and has always worked for me in PHPStorm.. I would expect a similar experience in Netbeans or Eclipse and other IDEs with a debugger config.
This is handy info, I think we should add this to the new docs. Thanks @kevinquillen !
[...] where the docroot is on the VM, which is quite simple in Vlad (/var/www/site/sitename).
Minor correction for anyone following along: the guest box's docroot is /var/www/site/docroot
.
@kevinquillen Out of interest, how do you have your interpreter setup in PHPStorm for this? Do you use the "SSH Credentials" or "Vagrant" config option?
I'll have to check.
On Saturday, February 21, 2015, Dan Bohea notifications@github.com wrote:
@kevinquillen https://github.com/kevinquillen Out of interest, how do you have your interpreter setup in PHPStorm for this? Do you use the "SSH Credentials" or "Vagrant" config option?
— Reply to this email directly or view it on GitHub https://github.com/hashbangcode/vlad/issues/99#issuecomment-75368660.
My PHP interpreter I have set to 5.5 (the one that ships with OSX).
I have never utilized the Vagrant integration in PHPStorm yet, nor the SSH Terminal options. I used to use the built in terminal plugin, but found that there were some oddities in using it vs the Terminal app.
When configuring XDebug, PHPUnit or Behat debugger tools, I just point it to the hostname specified in Vlad, and the path mapping I set to /var/www/site/docroot. That has always worked for the debugger for me, no problem.
My site files (Drupal) reside on my local machine, while Vlad is hosting it on Apache.
All this has been added to the documentation, with a few extra details. Feel free to add more details via the docs repo here: https://github.com/hashbangcode/vlad-docs
Vlad has good instructions for profiling (via Xdebug and XHProf) but cryptic instructions for debugging. It says To use the debugger, point your IDE at this box IP address ({{ boxipaddress }}) and use port 9000. I was unable to "point my IDE" at 192.168.100.100. Instead, I configured the VM to point to the host. My proposal:
xdebug.remote_host=192.168.100.1
in php.ini. That instructs the Vagrant instance to contact the host in order to connect to a debug client. 192.168.100.1 is what my host shows for an IP. If this changes for other configs, we just have to put a hostname or IP for the host here.We could add some pictures accompany these instructions.