I am trying to link my vagrant instance with my php debugger, PhpStorm. I tried following the instructions at https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning and https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_de... https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host, and installed XDebug in my chrome browser, but the connection isn’t happening. My debugger keeps saying “Waiting for incoming connection with ide key ‘#####’. Is there something missing here?
Techman224
On Sat, Dec 26, 2015 at 3:09 PM, Techman224 techman224@techman224.ca wrote:
I am trying to link my vagrant instance with my php debugger, PhpStorm. I tried following the instructions at https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning < https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning%3E and https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_de... < https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_de..., and installed XDebug in my chrome browser, but the connection isn’t happening. My debugger keeps saying “Waiting for incoming connection with ide key ‘#####’. Is there something missing here?
I'm not sure how much on those pages is still relevant today (apart from enabling the zend role in vagrant, which definitely makes XDebug a lot more reliable); debugging with PhpStorm works mostly out of the box. Just launch vagrant, enable XDebug with a cookie/browser plugin/whatever, enable listening to XDebug in PhpStorm by clicking the phone icon, then do something in the browser that triggers a HTTP request, and PhpStorm will open a setup dialog for the incoming debug request where you can match local and remote directories. You might need to make the relevant code locally accessible; see T88149 https://phabricator.wikimedia.org/T88149 about that. For CLI debugging you need to set up some environment variables as well; see T59676 https://phabricator.wikimedia.org/T59676.
If that does not work then you can set xdebug.remote_log="/vagrant/logs/xdebug.log" or something similar in a PHP config file and see if it says anything useful.
It seems to be picking up the connection, but I don’t think the breakpoints are working properly. When I put in a breakpoint, it seems to ignore it. But when I check “Break at first line in PHP scripts", it breaks on index.php. This is pretty much useless for debugging.
Techman224
On Dec 27, 2015, at 8:17 PM, Gergo Tisza gtisza@wikimedia.org wrote:
On Sat, Dec 26, 2015 at 3:09 PM, Techman224 techman224@techman224.ca wrote:
I am trying to link my vagrant instance with my php debugger, PhpStorm. I tried following the instructions at https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning < https://www.mediawiki.org/wiki/MediaWiki-Vagrant#Provisioning%3E and https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_de... < https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_de..., and installed XDebug in my chrome browser, but the connection isn’t happening. My debugger keeps saying “Waiting for incoming connection with ide key ‘#####’. Is there something missing here?
I'm not sure how much on those pages is still relevant today (apart from enabling the zend role in vagrant, which definitely makes XDebug a lot more reliable); debugging with PhpStorm works mostly out of the box. Just launch vagrant, enable XDebug with a cookie/browser plugin/whatever, enable listening to XDebug in PhpStorm by clicking the phone icon, then do something in the browser that triggers a HTTP request, and PhpStorm will open a setup dialog for the incoming debug request where you can match local and remote directories. You might need to make the relevant code locally accessible; see T88149 https://phabricator.wikimedia.org/T88149 about that. For CLI debugging you need to set up some environment variables as well; see T59676 https://phabricator.wikimedia.org/T59676.
If that does not work then you can set xdebug.remote_log="/vagrant/logs/xdebug.log" or something similar in a PHP config file and see if it says anything useful. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Thu, Dec 31, 2015 at 7:40 PM, Techman224 techman224@techman224.ca wrote:
It seems to be picking up the connection, but I don’t think the breakpoints are working properly. When I put in a breakpoint, it seems to ignore it. But when I check “Break at first line in PHP scripts", it breaks on index.php. This is pretty much useless for debugging.
Sounds like path matching is not set up. (Settings > Languages & Frameworks
PHP > Servers) Your host machine's vagrant directory should be set to
/vagrant and you should copy the guest machnie's /var/www directory to some place that's accessible on your host machine, and set it accordingly. (E.g. run "cp -R /var/www /vagrant/docroot" on the guest machine and then set <your vagrant folder>/docroot to /var/www in the Servers menu.)
wikitech-l@lists.wikimedia.org