PHP version: 5.6.20
XDebug version: 2.4.0
Adapter version: 1.7.1
Your launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
XDebug php.ini config:
zend_extension=/usr/local/Cellar/php56/5.6.20/php/php/extensions/no-debug-non-zts-20131226/xdebug.so
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_log=/var/log/xdebug.log
XDebug logfile (from setting xdebug.remote_log in php.ini):
Log opened at 2016-04-29 07:49:00
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4947" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:00
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4943" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4944" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4947" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4949" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4919" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:01
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
Log closed at 2016-04-29 07:49:01
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4944" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Log opened at 2016-04-29 07:49:01
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4943" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:01
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4947" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4949" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4919" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4944" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4943" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4947" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4949" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
Log opened at 2016-04-29 07:49:02
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4919" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-04-29 07:49:02
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
Log closed at 2016-04-29 07:49:03
Log opened at 2016-04-29 07:49:03
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:///www/sites/profitplace/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="4943" idekey="XDEBUG_ECLIPSE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
Adapter logfile (from setting "log": true in launch.json):
Code snippet to reproduce:
public function actionActivatecard($cardId)
{
try {// here is breakpoint
$this->cardService->activateCard($cardId); // here is breakpoint
} catch (\Exception $e) { // here is breakpoint
$this->processException($e);
}
$this->response['type'] = 'success';
$this->sendAjaxResponse($this->response);
}
My problem is, that I can't pause execution of PHP code with PHP Debug. I have used this extension with VS Code before and it worked great. But then I needed to re-compile PHP module on my machine and since than it is no working. With command 'php -m' I can see xdebug extension listed twice as expected. I tried it with different setting in php.ini but without any success. But the biggest mistery is, that after recompilation of my php module I set up xdebug extension and it worked fine. But when I opened my computer again, it won't pause on any breakpoint even no on everything. In my chrome I'm using extension Xdebug helper, which I needed to enable before debugging. I would be very thankful if you can help me
@Jakub-Profit-Place do you still experience the issue?
@felixfbecker thanks for reply and yes I'm still experiencing this issue. Which more info should I provide?
Could you put a phpinfo(); statement in a file and access that with a browser and upload the output?
And please try setting a breakpoint in the testproject from this repository so we can be sure it isn't because of a bug in your application.
I tried to set a breakpoint in the testproject from this repository, but I didn't succeeded. Both X-debug helper chrome pluggin and debugger in VS Code was running, but it still won't stop on any breakpoint. My phpinfo(); is here



Thanks once more for helping. It seems that adapter would ever not communicate with xdebug extension as I can say as layman, because in console of xdebug in VS Code nothing changed when it is expected (some new request, or Call Stack), what was previously different.
did the xdebug log change?
yes, I have there a lot of today's records like
Log opened at 2016-07-04 12:47:56
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:///www/sites/mysite/www/index.php" language="PHP" xdebug:language_version="5.6.19" protocol_version="1.0" appid="34861" idekey="XDEBUG_VSCODE"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 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 2016-07-04 12:47:56
weird...
so could U say, that all my configuration files are all right? Please, can U advise me what else should I check to make this php-debug working? PHP debugging is also not working in my second IDE - Atom so the problem probably will be in some configuration. Situation is just same, debugging log won't change or any stop on breakpoint is not working.
Yeah, your configuration seems fine. Are your webserver and VS Code on the same machine?
I would try reinstalling everything, other than that I don't really know. It certainly is not related to my adapter if it fails with other IDEs too. You can probably get more help from the XDebug community.
I'm running into the same issue.
I am using a remote connection with port fowarding. The logs look ok.
"stopOnEntry" does work, but any breakpoints I manually set do not stop execution.
Here is my config:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug - Docker",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Listen for XDebug - Web 4",
"type": "php",
"request": "launch",
"serverSourceRoot": "/ebsvol/......./html",
"localSourceRoot": "${workspaceRoot}/html",
"port": 9000,
"stopOnEntry": true,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Can you reopen? I agree it's weird, but there does seem to be an issue somewhere.
@ConceitedCode please open a new issue and provide me your log files
I spent 6 hours to figure out the issue... My docker-compose.yml was as below
The issue is port 9000 from my host is bind to port 9000 of php docker... When php docker service connect to your localhost xdebug server, logs say that connection is ok, but you are connected to your php docker....
php-fpm:
build: ./php
volumes:
- ../../:/var/www/html
links:
- cassandra
ports:
- 9000
networks:
- bridge
environment:
XDEBUG_CONFIG: remote_host=172.17.0.1
I changed port on xdebug-server to 8888 and remote_port to 8888 and finally, it works with phpstorm.
But I daily work with sublime text... so I did an other fix, I changed docker configuration php as below :
php-fpm:
build: ./php
volumes:
- ../../:/var/www/html
links:
- cassandra
ports:
- 9001:9000
networks:
- bridge
environment:
XDEBUG_CONFIG: remote_host=172.17.0.1
Then port 9000 is free to use on host machine and xdebug work on default port with sublime text!
If you are using PhpStorm for xDebug, stop PhpStorm xDebug first.
Then VSCode may be OK.
Most helpful comment
If you are using PhpStorm for xDebug, stop PhpStorm xDebug first.
Then VSCode may be OK.