Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XDebug stopped working in PHPStorm

I've been beating my head against this for hours.

I've come back to do some work in PHPStorm after not having used it in a couple of weeks, and for some reason the debug doesn't work any more. It used to work, but now it doesn't and I have no idea what is going on.

I'm running on Windows, using IIS, PHP version 5.3.8. The XDebug is installed, and I've set the configuration in PHP.ini as per the usual instructions.

When I run phpinfo() everything looks normal (ie. XDebug is there).

I've rechecked various settings, downloaded a slightly newer version of XDebug than I was using (Xdebug v2.2.1), but nothing seems to kick it into life.

Can someone please give me some clues as to what I can look at next?

UPDATE:

I've spent a few more hours beating my head against this, and don't seem to have gotten much further. XDebug is installed and loaded, according to phpinfo(). I turned on logging, but it doesn't really tell me much except that XDebug is indeed connecting...

Log opened at 2013-02-17 04:13:07
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/web/dbg/index.php" language="PHP" protocol_version="1.0" appid="6912" idekey="PHPSTORM"><engine version="2.2.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2012 by Derick Rethans]]></copyright></init>

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

Log closed at 2013-02-17 04:13:07

So it seems that the problem is on the PHPStorm side, but I cannot see where. I tried creating a very simple project, but could not get that to debug either.

like image 210
xtempore Avatar asked Feb 15 '13 04:02

xtempore


People also ask

How does xdebug work with PhpStorm?

PhpStorm supports the use of Xdebug in the Just-In-Time (JIT) mode so it is not attached to your code all the time but connects to PhpStorm only when an error occurs or an exception is thrown. Depending on the Xdebug version used, this operation mode is toggled through the following settings: Xdebug 2 uses the xdebug .


2 Answers

Don't you hate it when you spend hours wrestling with something, then in desperation try something simple, and it works?

I decided to try a different port, 9001 instead of the default 9000, and it WORKED!

I now realise that I recently installed Twonky (for video streaming to my TV), and when I checked the settings, there it was... port 9000.

like image 82
xtempore Avatar answered Jan 06 '23 15:01

xtempore


Had the same issue this afternoon - found this question along with several other SO questions so I thought I'd post the solution that fixed it for me.

I was missing a mapping to the file system. Which is odd because I've seen PHPStorm prompt me when they've been missing previously.

enter image description here

Hopefully this helps someone in the future :)

like image 23
cloakedninjas Avatar answered Jan 06 '23 15:01

cloakedninjas