Xdebug PhpStorm cant break in any controller

I found strange behaviour in xdebug xdebug ignore breakpoint in my controller but I can trace it (from index.php) untul it break in my controller. Also it can break on xdebug_break()

Here is some log in from xdebug remote log

3:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpointset" transactionid="145" id="25220003"></response> 29:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepinto" transactionid="4" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/public/index.php" lineno="18"></xdebug:message></response> 31:<- breakpointset -i 5 -t line -f file:///var/www/licman/app/modules/admin/controllers/SessionController.php -n 38 32:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpointset" transactionid="5" id="25230001"></response> 34:<- breakpointset -i 6 -t line -f file:///var/www/licman/public/index.php -n 22 35:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpointset" transactionid="6" id="25230002"></response> 41:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="8" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/public/index.php" lineno="22"></xdebug:message></response>

And here is log when I trace it till SessionController

29:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepinto" transactionid="4" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/public/index.php" lineno="18"></xdebug:message></response> 31:<- breakpointset -i 5 -t line -f file:///var/www/licman/app/modules/admin/controllers/SessionController.php -n 38 32:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpointset" transactionid="5" id="25250001"></response> 34:<- breakpointset -i 6 -t line -f file:///var/www/licman/app/PluginInitialization.php -n 30 35:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpointset" transactionid="6" id="25250002"></response> 41:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transactionid="8" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/PluginInitialization.php" lineno="30"></xdebug:message></response> 56:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="13" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/PluginInitialization.php" lineno="32"></xdebug:message></response> 71:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="18" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/PluginInitialization.php" lineno="40"></xdebug:message></response> 86:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="23" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Module.php" lineno="62"></xdebug:message></response> 101:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="28" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Module.php" lineno="41"></xdebug:message></response> 116:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="33" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Module.php" lineno="42"></xdebug:message></response> 131:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="38" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Module.php" lineno="43"></xdebug:message></response> 146:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="43" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Module.php" lineno="57"></xdebug:message></response> 161:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="48" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/vendor/composer/ClassLoader.php" lineno="269"></xdebug:message></response> 176:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="53" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/vendor/composer/ClassLoader.php" lineno="270"></xdebug:message></response> 191:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="58" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/vendor/composer/ClassLoader.php" lineno="272"></xdebug:message></response> 206:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="63" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Controllers/SessionController.php" lineno="37"></xdebug:message></response> 221:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transactionid="68" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Controllers/SessionController.php" lineno="38"></xdebug:message></response> 236:-> <response xmlns="urn:debuggerprotocolv1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stepover" transaction_id="73" status="break" reason="ok"><xdebug:message filename="file:///var/www/licman/app/Modules/Admin/Controllers/SessionController.php" lineno="39"></xdebug:message></response>

Is there any solution for my problem?

Did you ever get a resolution for this? I am getting a similar problem.



5.8k

hello,

you can add xdebugbreak() in your php code. So debugger will break on that command, I think that is the only way

Thank you, that got me further along. It would then break, but not synchronize the file view with the debug console.

I then found that PHPStorm's automatic server path mapping had mapped my /public directory where my index.php bootstrap file is, but not my root directory just above it, so nothing in the app directories would be found. I used the dialog described in this link to add a mapping for my root and now all is well, no need even for xdebug_break() any more.

https://www.jetbrains.com/phpstorm/webhelp/override-server-path-mappings-dialog.html

I hope this helps you too.