Drush https://janezurevc.name/ en Debug drush requests in PHPStrom https://janezurevc.name/debug-drush-requests-phpstrom <span>Debug drush requests in PHPStrom</span> <span><span lang="" about="https://janezurevc.name/users/slashrsm" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">slashrsm</span></span> <span>Wed, 14.08.2013 - 12:26</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>Today I needed to debug <a href="https://drupal.org/project/drush">Drush</a> request. Since I've been using <a href="https://www.jetbrains.com/phpstorm/">PHPStorm</a> for last few weeks I wanted to use it for that. After a bit of research I found this way to achieve what I needed:</p> <ol><li>Install and configure Xdebug. There are plenty <a href="https://lmgtfy.com/?q=xdebug+installation">posts about this all over the internet</a>.</li> <li>Start normal web debug session in PHPStorm. Look for <em>"Waiting for incoming connection with ide key '17862'."</em> in PHPStorm's debug window. 17862 will be something else in your case. Remember this number as we're going to need it in next steps.</li> <li>Open terminal and set new variable<br /><pre> export XDEBUG_CONFIG="idekey=17862"</pre><p>Remember to replace "17862" with the number you remembered in the previous step.</p></li> <li>Run your drush command and PHPStorm should stop on first breakpoint that you've set.</li> </ol><p>Tadaaaa! :) That was easy. I'm not sure if there is any even more convenient way to do this. If you're aware about it, please feel free to leave a comment. </p> </div> Wed, 14 Aug 2013 10:26:29 +0000 slashrsm 61 at https://janezurevc.name