Trigger Firefox PHP Debugging

Hello. I thought I would start a new thread for my Firefox issue, and hopefully someone can point me in the right direction :)

I'm using WAMP with xDebug and have managed to enable PHP debugging within the Debugger and Console windows, which
is great.

I've installed bookmarklets within Firefox to (xDebug) Break On, Start Session, Debug this page;
I'm 'listening' for a PHP debug session on port 9000;
I've set a breakpoint within my PHP;
I load my local page within Firefox and Start Session, Debug this page, etc..

The Console reports that it is "waiting for incoming connection with ide key "PHPSTORM".

I've also applied the settings for PHP/ Debug/ xDebug/ port 9000, Can accept external connections,
break at first line (for external connections).

What setting might I be missing please? Andy.

7 comments

Hello Andrew,

What PhpStorm version do you use? Do you have symlinks in your project? Xdebug log would be useful: xdebug.org/docs/remote#remote_log

The Console reports that it is "waiting for incoming connection with ide key "PHPSTORM".


You don't need to use 'PHP Web Application' or 'PHP Remote Debug' run configurations with debug bookmarklets. Just enable 'Listen' button.

Thank you for feedback!

0

@Nikolay Thanks for your response.

I have PhpStorm 2.1. I don't believe I have symlinks (as I don't know what they are..).

I start Apache (via WAMP);
Open PhpStorm and my project;
Set a breakpoint and start 'listening';
I open my browser, and load the relevant page;
I click bookmarklets to Start Session, Break On, and
xDebug this page, and re-load the page.

Nothing at all happens within PhpStorm.

I have some Edit Configurations but I haven't touched them; do I need
to delete them?

Here's the log if it helps:

Log opened at 2011-11-17 18:09:32
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/wamp/www/first/index.php" language="PHP" protocol_version="1.0" appid="3368" idekey="PHPSTORM"><engine version="2.1.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2011 by Derick Rethans]]></copyright></init>

<- feature_set -i 0 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>

<- feature_set -i 1 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

<- feature_set -i 2 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>

<- step_into -i 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="3" status="stopping" reason="ok"></response>

<- eval -i 4 -- aXNzZXQoJF9DT09LSUVbJ1BIUFNUT1JNX1hERUJVR19CUkVBSyddKQ==
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="4"><error code="5"><message><![CDATA[command is not available]]></message></error></response>

Log closed at 2011-11-17 18:09:32

Log opened at 2011-11-17 18:09:34
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/wamp/www/first/index.php" language="PHP" protocol_version="1.0" appid="3368" idekey="PHPSTORM"><engine version="2.1.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2011 by Derick Rethans]]></copyright></init>

<- feature_set -i 0 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>

<- feature_set -i 1 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>

<- feature_set -i 2 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>

<- step_into -i 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="3" status="stopping" reason="ok"></response>

<- eval -i 4 -- aXNzZXQoJF9DT09LSUVbJ1BIUFNUT1JNX1hERUJVR19CUkVBSyddKQ==
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="4"><error code="5"><message><![CDATA[command is not available]]></message></error></response>

Log closed at 2011-11-17 18:09:34

0

Andrew,

Could you please attach your 'phpinfo()' output?

Does 'C:\wamp\www\first\index.php' script contain any php statements?

Thanks!

0

Hello. Yes, my index.php does contain some php (print) statements.

I've attached my phpinfo as a text file.

Thanks again, Andy.



Attachment(s):
just_info.php.txt.zip
0

Thought I would report back as I (finally) got this working.

I found that xDebug was loaded as a normal PHP, rather than Zend, extension. I spent
ages configuring the php.ini [xdebug] settings - but I was wasting my time. This was
because the following line appeared much earlier in the .ini file:

extension=php_xdebug-2.1.2-5.3-vc9-x86_64.dll

This line was over-ruling any changes I was making to the [xdebug] settings, and
commenting it out resolved everything.

Debugging from within Firefox doesn't behave as I was expecting though. I was
anticipating it constructing the page in stages, but it either remains blank, completes
half the page, or just completes the entire page. Is this the way it is supposed to
behave?

Regards, Andy.

0

This is not related to debugging or IDE but a result of your server response buffering and is an intended behavior.
Also the browser may not render some page objects i.e. tables at all until loaded completely.

0

Thank you Alexey.

I thought this might be the case ;)

0

Please sign in to leave a comment.