Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After some period of time I found the solution. In my case it must be split in 2 parts:</p> <h2>Configure XDebug in PHPStorm</h2> <ol> <li>Get appropriate Xdebug version. <a href="http://xdebug.org/wizard.php" rel="noreferrer">Use this wizard from official xdebug site</a>; <em>just copy&amp;past your phpinfo() response into window and it will tell you which version you must download</em>.</li> <li><p>Install it and make sure that XDebug is activated (<strong><em>phpinfo()</em> must return xdebug section in the response</strong>). <a href="http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide" rel="noreferrer">Use the following link for detailed instructions</a> <img src="https://i.stack.imgur.com/cIY2J.png" alt="enter image description here"></p></li> <li><p>Set XDebug as debugger for PHP in Project Settings <img src="https://i.stack.imgur.com/5EBLZ.png" alt="enter image description here"></p></li> </ol> <p><strong>[The steps below are specific for Yii console application debugging]</strong></p> <ol start="4"> <li><p>Find <em>yiic.php</em> file in your project and Run or Debug it first time. <img src="https://i.stack.imgur.com/uXUq1.png" alt="enter image description here"></p></li> <li><p>After this go Run->Edit Config and set name of your command in the arguments with required parameters. <img src="https://i.stack.imgur.com/RGqBK.png" alt="enter image description here"></p></li> <li><p>Now set breakpoints in your code and activate "Listen debugger connections” button. <img src="https://i.stack.imgur.com/WQKhf.png" alt="enter image description here"></p></li> </ol> <h2>Debugging Yii command actions</h2> <ol> <li><p>If you want <strong>to use actions (like actionRebuildIndexes) in the command it needs to call the parent::run</strong> method in the run() function.</p> <p>public function run($args) { parent::run($args); return 0; }</p></li> <li>For debugging it needs to specify the action name in the arguments for yiic.php Run Configuration (see image above)</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload