Success

User tests: Successful: Unsuccessful:

avatar peterpeter
peterpeter
7 Nov 2015

Using PHPStorms XDEBUG seems to be a bit tricky, as what I'm heared. Now I've found a solution that works for me, and on windows.

Testing:

Set in Storm a breakpoint (e.g. in RoboFile.php), and switch the debugger-listening 'on'. Open a CMD-Window and go to your weblinks-directory and calli once vendor\bin\debug, before run the tests. Script should stop at the breakpoint, and the debuger should behave normal.

As I'm using XDEBUG with all 'defaults' settings, it works for me. Maybe you have to adjust the settings in debug.bat to your xdebug configuration.

I've previously tried to add this to the RoboFile.ini as a confirguration parameter (and settet that in RoboFile.php in getConfiguration per $this->_execute($configuration['debugerSettings']);) but it wont work that way.

And if it works for windows users, there's a similar simple solution for Linux/Mac ;-)
See https://confluence.jetbrains.com/display/PhpStorm/Debugging+PHP+CLI+scripts+with+PhpStorm

avatar peterpeter peterpeter - open - 7 Nov 2015
avatar javigomez
javigomez - comment - 9 Dec 2015

mmm vendor/bin/ shouldn't be the folder for this since is created by composer. I think is better that we add it as you mentioned as robo command.

I'm not sure how it works, yet haven't tested but for that purpose in robo this same like should work:

$this->_exec('SET XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0"');

actually you can create a function with a name like activatePhpstormXdebug passing the values: port, host, ... but in anycase, I don't see it as something to be used by all the users. Instead you can create your on rob task and create a package in Packagist to be used by anyone, loading it via composer.json. See for example: https://packagist.org/packages/joomla-projects/robo

avatar Kubik-Rubik Kubik-Rubik - assigned - 9 Dec 15
avatar peterpeter
peterpeter - comment - 9 Dec 2015

Ok, I'll check that, thanks!

avatar chrisdavenport
chrisdavenport - comment - 25 Jun 2016

What is the status of this PR? (Just trying to tidy up).

avatar yvesh
yvesh - comment - 1 Aug 2016

Closing for now, please look into the comments and if you want do a new updated pull request again. Thank you!

Add a Comment

Login with GitHub to post a comment