View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001269 | Xdebug | Uncategorized | public | 2016-02-15 19:42 | 2024-04-15 13:42 |
Reporter | reyncor | Assigned To | derick | ||
Priority | high | Severity | major | Reproducibility | always |
Status | acknowledged | Resolution | suspended | ||
Platform | All | OS | Fedora | OS Version | 23 |
Product Version | 2.3.3 | ||||
Target Version | 3.4dev | ||||
Summary | 0001269: xdebug_break() does not work in PHP Interactive Shell | ||||
Description | Any attempt to run xdebug_break() will be ignored when running with php -a -d xdebug.idkey=atom Even, "include 'file.php'" fails to trigger a break with xdebug_break(); | ||||
Steps To Reproduce |
The code will not break. | ||||
Tags | No tags attached. | ||||
Operating System | Fedora 23 | ||||
PHP Version | 8.0-dev | ||||
|
Have you exported the environment variable XDEBUG_CONFIG on the shell? If I run it like this: XDEBUG_CONFIG="idekey=dr" php -a -d xdebug.remote_enable=1 Then it connects to the debugger, and stops at the xdebug_break() just fine. |
|
Ping? |
|
I could be missing something but I just tried (using 'debugclient' that comes with the extension) and it doesn't seem to be working :/ After including PHP file the client receives INIT package like this: <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///home/pc/test_dir/test.php" language="PHP" xdebug:language_version="5.5.9-1ubuntu4.14" protocol_version="1.0" appid="16880" idekey="dr"><engine version="2.4.0RC5-dev"><![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> This is great, but then after: 'run -i 1' the PHP script executes completely without breaking and 'debugclient' prompt stays busy. Only after I quit PHP the client prompt returns with a package like this: <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="1" status="stopping" reason="ok"></response> === I tried the same PHP script in non-interactive mode it works as expected. <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="1" status="break" reason="ok"><xdebug:message filename="file:///home/pc/test_dir/test.php" lineno="8"></xdebug:message></response> === Am I doing it wrong? Could it be PHP version? I'm on master branch of xdebug (commit: f4c6c8c). Thanks! |
|
Hi, I've spend some more time figuring out what the problem is. I can indeed reproduce this now. xdebug_break() works by setting a flag (XG(context).do_break) to 1, which then For some reason, the intermediate Even when forcing that with the additional -e argument to PHP, this does not I will have to suspend this until the appropriate steps can be taken in PHP cheers, |
|
In Php > 8, it works, but only once at debugger session. In Xdebug 3.3.0 it activates by whatever command is executed first, and also only once per session. |
|
I meant once per PHP interactive shell session |
|
@anton.m4354 -- that would make sense, as that is when Xdebug would initiate the debugging connection |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-02-15 19:42 | reyncor | New Issue | |
2016-02-23 22:45 | derick | Note Added: 0003517 | |
2016-02-23 22:45 | derick | Assigned To | => derick |
2016-02-23 22:45 | derick | Status | new => feedback |
2016-02-27 16:00 | derick | Note Added: 0003528 | |
2016-02-28 14:59 | artbek | Note Added: 0003535 | |
2016-05-10 22:27 | derick | Note Added: 0003596 | |
2016-05-10 22:27 | derick | Status | feedback => resolved |
2016-05-10 22:27 | derick | Resolution | open => suspended |
2016-07-31 12:36 | derick | Category | Usage problems => Usage problems (Crashes) |
2016-07-31 12:38 | derick | Category | Usage problems (Crashes) => Usage problems (Wrong Results) |
2020-03-12 16:35 | derick | Category | Usage problems (Wrong Results) => Variable Display |
2020-03-12 16:38 | derick | Category | Variable Display => Uncategorized |
2023-12-10 12:29 | anton.m4354 | Note Added: 0006718 | |
2023-12-10 12:37 | anton.m4354 | Note Added: 0006719 | |
2023-12-19 10:19 | derick | Status | resolved => acknowledged |
2023-12-19 10:19 | derick | PHP Version | 5.6.15-5.6.19 => 8.0-dev |
2023-12-19 10:19 | derick | Target Version | => 3.4dev |
2024-04-15 13:42 | derick | Note Added: 0006906 |