View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001335XdebugRemote Debuggingpublic2016-08-04 09:262018-01-22 18:21
Assigned Toderick 
StatusclosedResolutionunable to reproduce 
Platformwindows 7OSOS Version
Product Version2.4.1 
Target Version2.6.0Fixed in Version2.6.0rc1 
Summary0001335: When debug gives "can not get property"
DescriptionProblem starts from 2.4.0 for php7.

You can see all on screenshots.

On php 5.6 Xdebug 2.4.0 works fine. But php7 Xdebug 2.4.0 or 2.4.1 gives "can not get property"
TagsNo tags attached.
Operating System
PHP Version7.0.15-7.0.19
Attached Filesjpg file icon php7-xdebug.2.4.1.jpg [^] (248,179 bytes) 2016-08-04 09:26

jpg file icon php5.6-xdebug2.4.0.jpg [^] (260,906 bytes) 2016-08-04 09:27

jpg file icon xdebuglog-php7-xdebug.2.4.1.jpg [^] (1,039,384 bytes) 2016-08-04 09:27
png file icon xdebug php 7.0.9 xdebug 2.4.0.png [^] (63,219 bytes) 2016-08-12 16:53

? file icon test.php [^] (928 bytes) 2017-04-12 20:32
png file icon xdebug_can_not_get_property.png [^] (5,058 bytes) 2017-04-12 20:39

png file icon 1335.png [^] (35,444 bytes) 2017-04-16 09:27

log file icon xdebug.log [^] (14,266 bytes) 2017-04-18 11:26
log file icon xdebug-ibotpeaches.log [^] (19,070 bytes) 2017-04-18 17:27
png file icon 26dev.png [^] (38,956 bytes) 2017-04-21 13:00

tar file icon xdebug.tar [^] (16,896 bytes) 2017-12-21 02:51

- Relationships

-  Notes
derick (administrator)
2016-08-04 10:17

Please follow the instructions at [^] to submit a good debugger issue. I will need that before I can investigate and fix this.
zuluzzz (reporter)
2016-08-04 12:06

Its hard to make you a small script, because its all in core of yii and yii2 framework (also using DB).

I found that this BUG already was in earlier version of Xdebug:

check this out: [^]

Can you please take a look, maybe it is a same problem
zuluzzz (reporter)
2016-08-04 12:11

Also tested:

$object1 = new stdClass();
        $object1->someProperty = "o1";

        $object2 = new stdClass();
        $object2->someProperty = "o2";

        $storage = new SplObjectStorage();

And it falls with Xdebug ...
zuluzzz (reporter)
2016-08-09 10:33

SplObjectStorage bug fixed in later version of PHP (7.0.6). Tried with 7.0.8 (working).
But still problem with "can not get property" (phpstorm 2016.2 + yii (or yii2)).

Please do not close issue, maybe someone can help.
derick (administrator)
2016-08-09 23:01

Sorry, I still need a small reproducible script.
acuthbert (reporter)
2016-08-12 16:51

Hi I'm also having this problem and have tried 2.4.0, 2.4.1 and 2.4.2.

Unfortunately I've tried and failed to make a small reproducible script. The issue seems to arise when in the middle of production code involving a larger memory footprint, or more complex objects and array hierarchies. Many people on our team have the issue and it is really really frustrating - if you can give me some pointers in debugging xdebug on linux I'd be happy to try and debug for you (never debugged c code before!)

derick (administrator)
2016-11-16 21:23

acuthbert - can you at least provide a self contained re-reproducible case though? (And preferably, with Xdebug 2.5.0RC1).
derick (administrator)
2016-12-11 23:47

Can't reproduce, and the requested feedback was not provided.
rulatir (reporter)
2017-03-26 21:06

While I still don't have a minimal case, I managed to find a correlation between this bug's symptom in a production case and a _similar_ symptom in a minimal case.

In the production case I am trying to expand a private property of a base class of $this, and I get the "can not get property" symptom. I can make the symptom go away by changing the property to protected or public.

In the minimal case I am working on, I get an "undefined property" notice when I try to expand a private property of a base class of $this. The notice _also_ goes away when I change the property in the base class to protected or public.
rulatir (reporter)
2017-04-12 14:30

This bug is ABSOLUTELY CRIPPLING. I am running into it ALL THE TIME but ONLY EVER when debugging large codebases.

There will be no SMALL reproducing script EVER.

You should probably downgrade your expecation of "short and self-contained" to just "self-contained", as in a vagrant box with a full Laravel project in it.
radiat-r (reporter)
2017-04-12 20:38

I have attached a minimal testfile, with which i am able to reproduce the problem.

Just set a breakpoint on the "exit;" and try to view the content of the inner class.

Xdebug v2.5.1
PHP 5.6.30
Linux 2.6.32 x86_64
acuthbert (reporter)
2017-04-12 21:16
edited on: 2017-04-12 21:17

Radiat-r, you're a genius.

I've confirmed this does reproduce the error on:

Xdebug v2.4.0
PHP 7.0.15

If this gets fixed it'll really help me. I can't understand why it's not a more commonly reported issue. That said we did interview a senior developer yesterday whose debug method was still print and exit; :(

acuthbert (reporter)
2017-04-12 21:18

derick can we get this issue reopened now there's a reproducible test case?
derick (administrator)
2017-04-16 09:27

I still can't reproduce this with the attached test case. I've tried:

PHP 5.6.30, in ZTS and non-ZTS mode, with Xdebug 2.5.1 and 2.5.2-dev
PHP 7.0.15, in non-ZTS mode, with Xdebug 2.5.1
PHP 7.1.4-dev, in non-ZTS mode, with Xdebug 2.5.2-dev

also I had valgrind loaded to see memory/corruption issues.

In each case, I get the right answer, as is shown in the 1335.png attachment.

radiat-r, can you produce an Xdebug remote log with your debugging session?
Instructions are at [^]

And everybody, please make sure you're using at least Xdebug 2.5.1.
radiat-r (reporter)
2017-04-18 11:26

I have uploaded the requested logfile.

For privacy reasons, sensitive information has been removed and replaced with XXXXXXX.

This log has been taken from a different machine with PHP 7.1.3 and Xdebug v2.5.1 installed. The error shows up here as well.
derick (administrator)
2017-04-18 12:03

Radiat-r - the simplified case you showed here has no privacy sensitive code, so if you say you can reproduce it with that, I would need a remote log to go with *that* specific script. And line numbers etc need to match exactly too.
radiat-r (reporter)
2017-04-18 13:33

The log was produced with that specific, unmodified script.

The sensitive parts were removed from the logfile, e.g. Cookie-Values, Hostname and Path-Information, which should be irrelevant to the case.
iBotPeaches (reporter)
2017-04-18 17:27

Adding my xdebug.log as well, remote log w/ no redaction.

PhpStorm 2017.1.2
PHP 7.0.16
Xdebug 2.5.1

Breakpoint on "exit" line, same error. This started lately with PHPStorm 2017 update, I may be chasing the wrong problem. I might downgrade and try again.
derick (administrator)
2017-04-18 17:30

I have a hunch about what is causing this. I'll have an in depth look later.
derick (administrator)
2017-04-18 17:50

I can reproduce this with PhpStorm 2017.1.3, but not with 2016.3.2. I need to check whether PhpStorm does it right, or Xdebug does it right.
derick (administrator)
2017-04-19 15:12
edited on: 2018-01-14 13:33

I think I would say this is an unfortunate side effect of fixing a bug.

Xdebug sends the following packet containing:

<property name="*middle\abstrct\abstractmiddle*inner" fullname="$outer->middle->*middle\abstrct
\abstractmiddle*inner" facet="private" type="object" classname="inner\inner" children="1" numchildren

The important bit being "$outer->middle->*middle\abstrct\abstractmiddle*inner" (which gets XML-decoded


It then constructs (in 2007.1.3) the following followup:

property_get -i 35 -n $outer->middle->*middle\\abstrct\\abstractmiddle*inner -d 0 -c 0 -p 0

It incorrectly adds the slashes here, as it does not use double quotes, which is needed if you add slashes. I think this was in order to be able to deal with things like bug https://youtrack [^] and [^]

It doesn't do that in 2016.3.2, where the command it constructs is:

<- property_get -i 35 -n $outer->middle->*middle\abstrct\abstractmiddle*inner -d 0 -c 0 -p 0

The adding of slashes was added due to [^] and https://bugs [^], which is only fixed in Xdebug 2.6dev.

So right now, the following combinations work:

Xdebug 2.5.x with PhpStorm 2016(.3.2)
Xdebug 2.6dev with PhpStorm 2017(.1.3).

acuthbert (reporter)
2017-04-19 15:16

Thanks derick - I'll give 2.6dev a go and let you know what I get.
derick (administrator)
2017-04-20 23:52

acuthbert, any luck?
acuthbert (reporter)
2017-04-21 11:57

Sorry derick - it's probably obvious, but I can't see how to get 2.6dev - do I compile from source? But I can't see a 2.6 branch?
derick (administrator)
2017-04-21 12:21

It's the master branch on GitHub, and yes, you compile it from source.
acuthbert (reporter)
2017-04-21 12:24

Oh course, no problem.
acuthbert (reporter)
2017-04-21 12:59

Sorry, derick, same problem for me on storm 2017.1.3 and 2.6dev (see attached screenshot)
acuthbert (reporter)
2017-04-21 13:08

derick, confusingly the test.php script does work correcly! But as the previous shot shows there issue can still be reproduced.
derick (administrator)
2017-04-21 13:16

I'm going to need a way to reproduce that locally again then.
Till (reporter)
2017-06-23 09:30
edited on: 2017-06-26 09:02

Hi Guys,

i just came across this issue. funny thing it runs on my notebook but not on my workstation.

i did some tests with different php versions and xdebug versions but with the same php code and same versions of php and xdebug i get "can not get property"
i checked all the xdebug config values on both systems

i stripped the code down to a minimun and can invite you to the repository

update: i just switched from phpstorm 2017 to the 2016 versions and somehow this works?! strange behaivor because on my notebook 2017 runs.

v1nce (reporter)
2017-12-21 03:03
edited on: 2017-12-21 04:50

I've been able to reproduce this in a simple script, which i've attached to this ticket (xdebug.tar). It was a bit tricky (and took me all afternoon) due to requiring the use of namespaces before it manifests.

What seems to be happening is, as described, PhpStorm 2017.1.3 when talking to xdebug 2.6 is adding extra slashes to escape the name pathing bugs.

But it also looks like the deeper the properties you explore, the more "layers" of escaping are applied, and xdebug/phpstorm are in disagreement about how that's supposed to work.

This is seen in the xdebug logs:

<- property_get -i 17 -n $b->*TestA\\TestB\\TestC\\A*data1 -d 0 -c 0 -p 0
-> [... OK ...]

<- property_get -i 18 -n $b->*TestA\\\\TestB\\\\TestC\\\\A*data1->items -d 0 -c 0 -p 0
-> [... can not get property ...]

Investigating deeper it looks like the failure is on PHP Storm's side, and relates to the xdebug 2.6-dev specific changes made here: [^]

To that end I'll lodge a separate report with JetBrains and update this comment with a link back to that.


My local setup (same as 0001503):

Xdebug Version: 2.6(dev) 912eaeb8338d2945b6a424a1962e18fab854105b

PHP 7.2.0 (cli) (built: Nov 28 2017 20:38:49) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.0, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.6.0dev, Copyright (c) 2002-2017, by Derick Rethans

Note it says "v2.6.0dev" only because I customised the version string to ensure it was actually using the compiled version, rather than the most recent "v.2.6.0alpha1" pre-compiled module, which also exhibits this bug.

PhpStorm 2017.3.1
Build #PS-173.3942.32, built on December 13, 2017
Subscription is active until April 18, 2018
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

v1nce (reporter)
2017-12-21 05:14

Escaping issue reported to JetBrains: [^]
derick (administrator)
2018-01-14 00:38

This is very much related to 0001514 and 0001515. I also believe PhpStorm does do it wrong currently.
derick (administrator)
2018-01-14 14:44

I'm closing this, as on the Xdebug side everything now works. The test case log at [^] shows the right interaction. If PhpStorm does it differently (which, apparently, it does), it is a bug in PhpStorm. From what I gather, they're actively working on fixing this too.

- Issue History
Date Modified Username Field Change
2016-08-04 09:26 zuluzzz New Issue
2016-08-04 09:26 zuluzzz File Added: php7-xdebug.2.4.1.jpg
2016-08-04 09:27 zuluzzz File Added: php5.6-xdebug2.4.0.jpg
2016-08-04 09:27 zuluzzz File Added: xdebuglog-php7-xdebug.2.4.1.jpg
2016-08-04 10:17 derick Note Added: 0003666
2016-08-04 10:17 derick Assigned To => derick
2016-08-04 10:17 derick Status new => feedback
2016-08-04 10:17 derick Category Usage problems (Wrong Results) => Remote Debugging
2016-08-04 12:06 zuluzzz Note Added: 0003667
2016-08-04 12:06 zuluzzz Status feedback => assigned
2016-08-04 12:11 zuluzzz Note Added: 0003668
2016-08-09 10:33 zuluzzz Note Added: 0003670
2016-08-09 23:01 derick Note Added: 0003671
2016-08-12 16:51 acuthbert Note Added: 0003675
2016-08-12 16:53 acuthbert File Added: xdebug php 7.0.9 xdebug 2.4.0.png
2016-11-16 21:23 derick Note Added: 0003755
2016-11-16 21:25 derick Status assigned => feedback
2016-12-11 23:47 derick Note Added: 0004012
2016-12-11 23:47 derick Status feedback => resolved
2016-12-11 23:47 derick Resolution open => unable to reproduce
2017-03-26 19:16 rulatir Note Added: 0004241
2017-03-26 21:06 rulatir Note Added: 0004242
2017-03-27 02:51 rulatir Note Deleted: 0004241
2017-04-12 14:30 rulatir Note Added: 0004254
2017-04-12 14:42 rulatir Note Added: 0004255
2017-04-12 14:44 rulatir Note Deleted: 0004255
2017-04-12 20:32 radiat-r File Added: test.php
2017-04-12 20:38 radiat-r Note Added: 0004256
2017-04-12 20:39 radiat-r File Added: xdebug_can_not_get_property.png
2017-04-12 21:16 acuthbert Note Added: 0004257
2017-04-12 21:17 acuthbert Note Edited: 0004257 View Revisions
2017-04-12 21:17 acuthbert Note Edited: 0004257 View Revisions
2017-04-12 21:18 acuthbert Note Added: 0004258
2017-04-16 00:29 derick Status resolved => acknowledged
2017-04-16 09:27 derick PHP Version 7.0.0-7.0.4 => 7.0.15-7.0.19
2017-04-16 09:27 derick Note Added: 0004266
2017-04-16 09:27 derick Status acknowledged => feedback
2017-04-16 09:27 derick File Added: 1335.png
2017-04-18 11:26 radiat-r File Added: xdebug.log
2017-04-18 11:26 radiat-r Note Added: 0004277
2017-04-18 12:03 derick Note Added: 0004278
2017-04-18 13:33 radiat-r Note Added: 0004280
2017-04-18 17:27 iBotPeaches Note Added: 0004284
2017-04-18 17:27 iBotPeaches File Added: xdebug-ibotpeaches.log
2017-04-18 17:30 derick Note Added: 0004285
2017-04-18 17:50 derick Note Added: 0004286
2017-04-19 15:12 derick Note Added: 0004289
2017-04-19 15:16 acuthbert Note Added: 0004290
2017-04-20 23:52 derick Note Added: 0004307
2017-04-21 11:57 acuthbert Note Added: 0004311
2017-04-21 12:21 derick Note Added: 0004312
2017-04-21 12:24 acuthbert Note Added: 0004313
2017-04-21 12:59 acuthbert Note Added: 0004314
2017-04-21 13:00 acuthbert File Added: 26dev.png
2017-04-21 13:08 acuthbert Note Added: 0004315
2017-04-21 13:16 derick Note Added: 0004316
2017-06-23 09:30 Till Note Added: 0004359
2017-06-26 09:02 Till Note Edited: 0004359 View Revisions
2017-12-21 02:51 v1nce File Added: xdebug.tar
2017-12-21 03:03 v1nce Note Added: 0004525
2017-12-21 03:06 v1nce Note Edited: 0004525 View Revisions
2017-12-21 04:50 v1nce Note Edited: 0004525 View Revisions
2017-12-21 05:14 v1nce Note Added: 0004526
2018-01-04 16:50 derick Status feedback => acknowledged
2018-01-04 16:50 derick Target Version => 2.6.0
2018-01-14 00:38 derick Note Added: 0004559
2018-01-14 13:33 derick Note Edited: 0004289 View Revisions
2018-01-14 14:44 derick Note Added: 0004560
2018-01-14 14:44 derick Status acknowledged => closed
2018-01-14 14:44 derick Fixed in Version => 2.6.0
2018-01-22 18:21 derick Fixed in Version 2.6.0 => 2.6.0rc1

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker