MantisBT - Xdebug
View Issue Details
0000924XdebugRemote Debuggingpublic2013-02-13 18:282017-01-10 14:28
bobl 
derick 
normalminoralways
resolvedduplicate 
eclipse/pdtwindows7home premium sp1
2.2.1 
 
windows7
5.3.15-5.3.19
0000924: $test = array("\0" => ''); renders variable view inoperable
Encountered w/ eclipse, 4.2.1 and earlier 3.x.

Seems like a simple variable array declared as

$test = array("\0" => '');

Will wipe out the variable view such that no variables will appear in the window during subsequent code execution.

error_reporting(-1); // added as sanity check

[...]

$hello = 'world'; // variable window shows globals and $hello, all normal

$test = array("\0" => ''); // when executed, wipes out variable view, unable to find a way to recover variable view.

[...]


Don't know if this is eclipse problem or xdebug problem or illegal php statement. I know that program executes successfully to completion without any errors thrown by php and results are normal.

Apologies if this is known issue as I am new to xdebug. I searched around a bit for 'xdebug null byte' etc and didn't find anything on it.


Thank you very much for your consideration!
No tags attached.
duplicate of 0001312closed derick Implement DBGP's extended_properties to support names and values with \0 
has duplicate 0000610resolved derick Xdebug sends invalid '&#0' char reference in response 
has duplicate 0000940resolved derick xdebug quits when it reaches an object cast to array that contained protected properties 
has duplicate 0000953resolved derick Can not debug arrays which keys contain zero characters 
Issue History
2013-02-13 18:28boblNew Issue
2013-05-18 19:37derickNote Added: 0002467
2013-05-18 19:37derickAssigned To => derick
2013-05-18 19:37derickStatusnew => acknowledged
2013-05-18 22:03derickRelationship addedhas duplicate 0000610
2013-05-18 22:09derickRelationship addedhas duplicate 0000940
2013-06-22 14:02derickRelationship addedhas duplicate 0000953
2013-06-22 14:37derickNote Added: 0002509
2013-07-09 01:29spellerNote Added: 0002531
2014-05-03 23:21jbealesNote Added: 0002807
2014-06-05 21:17honza.trtikNote Added: 0002843
2014-06-06 09:03honza.trtikNote Edited: 0002843bug_revision_view_page.php?bugnote_id=2843#r184
2016-07-31 13:35derickCategoryDebug client (console) => debugclient (debugging tool)
2016-07-31 13:35derickCategorydebugclient (debugging tool) => (No Category)
2017-01-10 14:27derickNote Added: 0004170
2017-01-10 14:27derickRelationship addedduplicate of 0001312
2017-01-10 14:27derickStatusacknowledged => resolved
2017-01-10 14:27derickResolutionopen => duplicate
2017-01-10 14:28derickCategory(No Category) => Remote Debugging
2017-01-10 14:28derickSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=356#r356

Notes
(0002467)
derick   
2013-05-18 19:37   
So, this seems to be working just fine on the Xdebug side, however, the XML it generates is not liked by the IDEs. In order to fix this, I need a change in the debug protocol which requires some deliberation with other implementors.
(0002509)
derick   
2013-06-22 14:37   
The following addition has been suggested to the DBGp protocol for this:
https://github.com/derickr/dbgp/commit/78d8f586885565d006dd48dd9eae2cd00f71681a [^]
(0002531)
speller   
2013-07-09 01:29   
Thank you for your work, Derick: ) Hope most popular IDEs will accept and implement your changes quickly.
(0002807)
jbeales   
2014-05-03 23:21   
Hi Derick, it looks like the XML being generated by Xdebug is actually invalid. I tried dumping it into a couple of web browsers and they tell me the XML is invalid.

I'm running into the error debugging WordPress, and my IDE, (Sublime Text), is choking on the invalid XML.

The fragment of XML that the browsers don't like is:
<property name="�lambda_13" fullname="$wp_filter['widgets_init'][10]['�lambda_13']" address="4579437104" type="array" children="1" numchildren="2"></property>

That first &#0 seems to be the problem.

I'm experiencing this on OS X 10.9.2, with PHP 5.5 and Xdebug 2.2.5.

I've opened an issue with the Sublime Text Xdebug client as well, ( https://github.com/martomo/SublimeTextXdebug/issues/77 [^] ), but I'm not sure what they can do, the XML seems to be parsed using a built-in python XML parser or something.
(0002843)
honza.trtik   
2014-06-05 21:17   
(edited on: 2014-06-06 09:03)
Hi, is there any progress in implementing Dericks proposal into xdebug's dbgp protocol? For me, this is critical problem which prevents me from debugging almost all my code...

(0004170)
derick   
2017-01-10 14:27   
Duplicate of 0001312, which is fixed for Xdebug 2.6.0 - as long as the IDE supports DBGp's extended_properties feature.