xdebug fail PhpStorm 9.0.2
Hey -
I've had a working phpstorm installation for years.... the other day, I had to blow-away everything and re-install. I restored my old working directory from a back-up so I had all my files.
Everything works well, except, of course, the freaking debugger.
So, where to start diagnosing?
my xdebug in php.ini:
[xdebug]
xdebug.max_nesting_level = 300
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_log=/home/logs/xdebug.log
xdebug.remote_host=atldev
(xdebug is loaded by conf.d)
The web-server-debug-validation screenie is attached. it's good.
# php -v
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
Here's the xdebug log output:
Log opened at 2015-12-11 19:33:57
I: Checking remote connect back address.
I: Remote address found, connecting to 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/mshallop/code/php/aura-ds/utilities/testVaultPingBroker.php" language="PHP" protocol_version="1.0" appid="28881" idekey="XDEBUG_ECLIPSE"><engine version="2.3.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2015 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="stopping" reason="ok"></response>
<- eval -i 6 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>
Log closed at 2015-12-11 19:33:57
I: Checking remote connect back address.
I: Remote address found, connecting to 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/mshallop/code/php/aura-ds/utilities/testVaultPingBroker.php" language="PHP" protocol_version="1.0" appid="28881" idekey="XDEBUG_ECLIPSE"><engine version="2.3.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2015 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="stopping" reason="ok"></response>
<- eval -i 6 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>
Log closed at 2015-12-11 19:33:57
I'm not sure why I am getting the last entry...
I activate the xdebug plug-in on chrome, turn on the xdebug mode in the IDE, event hardcode a break point with xdebug_break(), but nothing works. I cannot stop execution at a breakpoint.
I was getting a lot of these:
11:34:44 AM Cannot accept external Xdebug connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'
But no longer. Still not clear on how I made it go-away...
I did actually get the debugger to work, once, by clicking the little debug symbol in the debug tab in the debug view. First time ever. Mostly, I just run from a browser because I get these:
11:40:48 AM php-cgi not found: Please ensure that configured PHP Interpreter built as CGI program (--enable-fastcgi was specified)
followed by a 502 error in the browser.... but don't worry, the debug-icon doesn't work any longer - just spits out the errors above.
I've followed the how-to's here on the jetbrains, stack-overflow, and basic blogs... but I just can't get traction.
What am I missing? I've *never* has this much trouble integrating a debugger before.
Thanks!
--mike
PS: phpinfo():
followed by a 502 error in the browser.... but don't worry, the debug-icon doesn't work any longer - just spits out the errors above.
I've followed the how-to's here on the jetbrains, stack-overflow, and basic blogs... but I just can't get traction.
What am I missing? I've *never* has this much trouble integrating a debugger before.
Thanks!
--mike
xdebug support | enabled |
---|---|
Version | 2.3.3 |
IDE Key | XDEBUG_ECLIPSE |
Supported protocols | Revision |
---|---|
DBGp - Common DeBuGger Protocol | $Revision: 1.145 $ |
Directive | Local Value | Master Value |
---|---|---|
xdebug.auto_trace | Off | Off |
xdebug.cli_color | 0 | 0 |
xdebug.collect_assignments | Off | Off |
xdebug.collect_includes | On | On |
xdebug.collect_params | 0 | 0 |
xdebug.collect_return | Off | Off |
xdebug.collect_vars | Off | Off |
xdebug.coverage_enable | On | On |
xdebug.default_enable | On | On |
xdebug.dump.COOKIE | no value | no value |
xdebug.dump.ENV | no value | no value |
xdebug.dump.FILES | no value | no value |
xdebug.dump.GET | no value | no value |
xdebug.dump.POST | no value | no value |
xdebug.dump.REQUEST | no value | no value |
xdebug.dump.SERVER | no value | no value |
xdebug.dump.SESSION | no value | no value |
xdebug.dump_globals | On | On |
xdebug.dump_once | On | On |
xdebug.dump_undefined | Off | Off |
xdebug.extended_info | On | On |
xdebug.file_link_format | no value | no value |
xdebug.force_display_errors | Off | Off |
xdebug.force_error_reporting | 0 | 0 |
xdebug.halt_level | 0 | 0 |
xdebug.idekey | no value | no value |
xdebug.max_nesting_level | 300 | 300 |
xdebug.max_stack_frames | -1 | -1 |
xdebug.overload_var_dump | On | On |
xdebug.profiler_aggregate | Off | Off |
xdebug.profiler_append | Off | Off |
xdebug.profiler_enable | Off | Off |
xdebug.profiler_enable_trigger | Off | Off |
xdebug.profiler_enable_trigger_value | no value | no value |
xdebug.profiler_output_dir | /tmp | /tmp |
xdebug.profiler_output_name | cachegrind.out.%p | cachegrind.out.%p |
xdebug.remote_autostart | Off | Off |
xdebug.remote_connect_back | On | On |
xdebug.remote_cookie_expire_time | 3600 | 3600 |
xdebug.remote_enable | On | On |
xdebug.remote_handler | dbgp | dbgp |
xdebug.remote_host | atldev | atldev |
xdebug.remote_log | /home/logs/xdebug.log | /home/logs/xdebug.log |
xdebug.remote_mode | req | req |
xdebug.remote_port | 9000 | 9000 |
xdebug.scream | Off | Off |
xdebug.show_exception_trace | Off | Off |
xdebug.show_local_vars | Off | Off |
xdebug.show_mem_delta | Off | Off |
xdebug.trace_enable_trigger | Off | Off |
xdebug.trace_enable_trigger_value | no value | no value |
xdebug.trace_format | 0 | 0 |
xdebug.trace_options | 0 | 0 |
xdebug.trace_output_dir | /tmp | /tmp |
xdebug.trace_output_name | trace.%c | trace.%c |
xdebug.var_display_max_children | 128 | 128 |
xdebug.var_display_max_data | 512 | 512 |
xdebug.var_display_max_depth | 3 | 3 |
Attachment(s):
Screenshot from 2015-12-11 12:12:43.png
Please sign in to leave a comment.
Hi there,
This usually happens when you running CLI script in terminal and it tries to start debugging session.
PhpStorm requires certain fields to be filled with server name/etc in order to recognize what debug settings (entry at "PHP | Servers") to use.
This suggests that you are using PhpStorm's own simple built in web server and your PHP is not suitable (was not compiled with right settings) to be run this way. Use your proper Apache to serve your web pages.
No idea what this is about.
I may only suggest to enable safe evaluation at "Settings/Preferences | Languages & Frameworks | PHP | Debug"
---
It all looks very weird.
I would suggest:
1. Create brand new empty project
2. Create one .php file with some simple content in it (one instruction per line), something like
3. Try to debug this file
A) in CLI mode ("PHP Script" type of Run/Debug configuration)
B) via browser (create new virtual host in your Apache)
P.S.
Try also setting up value for xdebug.idekey (e.g. "PHPSTORM")
Thanks for the quick reply!
I really don't want to use the CLI debugger; I have no interest in pursing this at this time and don't have the time to go down that rathole.
All of my test-stubs are run from the browser - I've been down now for 2-days and am getting yelled at to install Zend (geh!) Studio.
If I set-up an xdebug.idekey, where's the corresponding value go in phpstorm?
I have tried setting break points, using the php xdebug-break() method, and setting stop at first line - nothing responds.
Let's just focus on getting browser-based debugging working again....(because setting up new vhosts for debugging sucks)
thanks!
--mike
I did create a new test-utility using your example with a bp set at line 8: here's the xdebug out:
Log opened at 2015-12-11 21:57:35
I: Checking remote connect back address.
I: Remote address found, connecting to 127.0.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/mshallop/code/php/aura-ds/utilities/testDebug.php" language="PHP" protocol_version="1.0"
appid="1230" idekey="PHPSTORM"><engine version="2.3.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c)
2002-2015 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>
<- step_into -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="5" status="break" reason="ok"><xdebug:message filename="file:///home/ms
hallop/code/php/aura-ds/utilities/testDebug.php" lineno="8"></xdebug:message></response>
<- eval -i 6 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="6"><property address="140737117052512" type="bool"><![CDATA[0]]></property><
/response>
<- eval -i 7 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="7"><property address="140737117052512" type="bool"><![CDATA[1]]></property><
/response>
<- eval -i 8 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="8"><property address="140737117052512" type="string" size="11" encoding="bas
e64"><![CDATA[ZGFwaS5hdGxkZXY=]]></property></response>
<- eval -i 9 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="9"><property address="140737117052512" type="string" size="2" encoding="base
64"><![CDATA[ODA=]]></property></response>
<- eval -i 10 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10"><property address="140737117052512" type="string" size="24" encoding="ba
se64"><![CDATA[L3V0aWxpdGllcy90ZXN0RGVidWcucGhw]]></property></response>
<- run -i 11
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="11" status="stopping" reason="ok"></response>
<- stop -i 12
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="12" status="stopped" reason="ok"></response>
Log closed at 2015-12-11 21:57:35
Message was edited by: Micheal Shallop added xdebug.log output
Something else I just noticed:
when I right-click the source file (yours or mine) and select "debug" from the menu, it successfully goes into debug mode and hit's the breakpoints...
There's two little icons that proc'd as the debug run-as option the first time I hit it ... I can't make-out which icon is which (tiny, tiny little things) but I'm pretty sure I clicked on the second one...after which, of course, I no longer see that option once it ran.
Still not working from the browser....
"Run | Edit Configurations..." (or via drop down box on main toolbar -- next to Run/Debug buttons)
You can see all your existing Run/Debug Configurations there -- which type they are etc. Try deleting them (especially faded ones -- temporary; created via right click or alike).
If you have created one via context menu then most likely it would be one for CLI (as I do not remember seeing one for Web) or for JS debug.
----
You may also want to review (or even delete) all Server entries at "Settings/Preferences | Language & Frameworks | PHP | Servers" -- maybe they are not setup correctly (although it's rather unlikely). If none exist (or with unknown host name) then IDE should help creating new one one next incoming debug request.
Morning, Andriy,
I checked the things you mentioned in your last reply. I changed the server name setting from 127.0.0.1 to the alias I provided in /etc/hosts.
I also removed a test config for the test code you sent.
Now, the debugger is kicking on from a browers *and* I can debug using the icons from within the IDE - which I wasn't able to do before.
Still a bit of confusion as to why this was so difficult to set-up -- the last several major revs, debugging has been flawless. But it's working now and I can go back to being productive so, thank you, for your concern and help!
--mike