View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001335 | Xdebug | Step Debugging | public | 2016-08-04 08:26 | 2018-01-22 18:21 |
Reporter | zuluzzz | Assigned To | derick | ||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | unable to reproduce | ||
Platform | windows 7 | ||||
Product Version | 2.4.1 | ||||
Target Version | 2.6.0 | Fixed in Version | 2.6.0rc1 | ||
Summary | 0001335: When debug gives "can not get property" | ||||
Description | Problem 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" | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Operating System | |||||
PHP Version | 7.0.15-7.0.19 | ||||
|
Please follow the instructions at https://xdebug.org/support.php#remote to submit a good debugger issue. I will need that before I can investigate and fix this. |
|
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 |
|
Also tested: $object1 = new stdClass();
And it falls with Xdebug ... |
|
SplObjectStorage bug fixed in later version of PHP (7.0.6). Tried with 7.0.8 (working). Please do not close issue, maybe someone can help. |
|
Sorry, I still need a small reproducible script. |
|
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!) Andrew |
|
acuthbert - can you at least provide a self contained re-reproducible case though? (And preferably, with Xdebug 2.5.0RC1). |
|
Can't reproduce, and the requested feedback was not provided. |
|
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. |
|
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. |
|
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 |
|
Radiat-r, you're a genius. I've confirmed this does reproduce the error on: Xdebug v2.4.0 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; :( |
|
derick can we get this issue reopened now there's a reproducible test case? |
|
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 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? And everybody, please make sure you're using at least Xdebug 2.5.1. |
|
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. |
|
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. |
|
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. |
|
Adding my xdebug.log as well, remote log w/ no redaction. PhpStorm 2017.1.2 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. |
|
I have a hunch about what is causing this. I'll have an in depth look later. |
|
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. |
|
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\abstractmiddleinner" fullname="$outer->middle->middle\abstrct The important bit being "$outer->middle->middle\abstrct\abstractmiddleinner" (which gets XML-decoded $outer->middle->middle\abstrct\abstractmiddleinner It then constructs (in 2007.1.3) the following followup: property_get -i 35 -n $outer->middle->middle\abstrct\abstractmiddleinner -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 It doesn't do that in 2016.3.2, where the command it constructs is: <- property_get -i 35 -n $outer->middle->middle\abstrct\abstractmiddleinner -d 0 -c 0 -p 0 The adding of slashes was added due to https://youtrack.jetbrains.com/issue/WI-34998 and https://bugs So right now, the following combinations work: Xdebug 2.5.x with PhpStorm 2016(.3.2) |
|
Thanks derick - I'll give 2.6dev a go and let you know what I get. |
|
acuthbert, any luck? |
|
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? |
|
It's the master branch on GitHub, and yes, you compile it from source. |
|
Oh course, no problem. |
|
Sorry, derick, same problem for me on storm 2017.1.3 and 2.6dev (see attached screenshot) |
|
derick, confusingly the test.php script does work correcly! But as the previous shot shows there issue can still be reproduced. |
|
I'm going to need a way to reproduce that locally again then. |
|
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 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. |
|
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\Adata1 -d 0 -c 0 -p 0 <- property_get -i 18 -n $b->TestA\\TestB\\TestC\\Adata1->items -d 0 -c 0 -p 0 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: 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. IDE: |
|
Escaping issue reported to JetBrains: https://youtrack.jetbrains.com/issue/WI-39317 |
|
This is very much related to 0001514 and 0001515. I also believe PhpStorm does do it wrong currently. |
|
I'm closing this, as on the Xdebug side everything now works. The test case log at https://github.com/xdebug/xdebug/blob/master/tests/bug01335.phpt#L25-L62 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. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-08-04 08:26 | zuluzzz | New Issue | |
2016-08-04 08:26 | zuluzzz | File Added: php7-xdebug.2.4.1.jpg | |
2016-08-04 08:27 | zuluzzz | File Added: php5.6-xdebug2.4.0.jpg | |
2016-08-04 08:27 | zuluzzz | File Added: xdebuglog-php7-xdebug.2.4.1.jpg | |
2016-08-04 09:17 | derick | Note Added: 0003666 | |
2016-08-04 09:17 | derick | Assigned To | => derick |
2016-08-04 09:17 | derick | Status | new => feedback |
2016-08-04 09:17 | derick | Category | Usage problems (Wrong Results) => Remote Debugging |
2016-08-04 11:06 | zuluzzz | Note Added: 0003667 | |
2016-08-04 11:06 | zuluzzz | Status | feedback => assigned |
2016-08-04 11:11 | zuluzzz | Note Added: 0003668 | |
2016-08-09 09:33 | zuluzzz | Note Added: 0003670 | |
2016-08-09 22:01 | derick | Note Added: 0003671 | |
2016-08-12 15:51 | acuthbert | Note Added: 0003675 | |
2016-08-12 15: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 20:06 | rulatir | Note Added: 0004242 | |
2017-04-12 13:30 | rulatir | Note Added: 0004254 | |
2017-04-12 19:32 | radiat-r | File Added: test.php | |
2017-04-12 19:38 | radiat-r | Note Added: 0004256 | |
2017-04-12 19:39 | radiat-r | File Added: xdebug_can_not_get_property.png | |
2017-04-12 20:16 | acuthbert | Note Added: 0004257 | |
2017-04-12 20:17 | acuthbert | Note Edited: 0004257 | |
2017-04-12 20:17 | acuthbert | Note Edited: 0004257 | |
2017-04-12 20:18 | acuthbert | Note Added: 0004258 | |
2017-04-15 23:29 | derick | Status | resolved => acknowledged |
2017-04-16 08:27 | derick | PHP Version | 7.0.0-7.0.4 => 7.0.15-7.0.19 |
2017-04-16 08:27 | derick | Note Added: 0004266 | |
2017-04-16 08:27 | derick | Status | acknowledged => feedback |
2017-04-16 08:27 | derick | File Added: 1335.png | |
2017-04-18 10:26 | radiat-r | File Added: xdebug.log | |
2017-04-18 10:26 | radiat-r | Note Added: 0004277 | |
2017-04-18 11:03 | derick | Note Added: 0004278 | |
2017-04-18 12:33 | radiat-r | Note Added: 0004280 | |
2017-04-18 16:27 | iBotPeaches | Note Added: 0004284 | |
2017-04-18 16:27 | iBotPeaches | File Added: xdebug-ibotpeaches.log | |
2017-04-18 16:30 | derick | Note Added: 0004285 | |
2017-04-18 16:50 | derick | Note Added: 0004286 | |
2017-04-19 14:12 | derick | Note Added: 0004289 | |
2017-04-19 14:16 | acuthbert | Note Added: 0004290 | |
2017-04-20 22:52 | derick | Note Added: 0004307 | |
2017-04-21 10:57 | acuthbert | Note Added: 0004311 | |
2017-04-21 11:21 | derick | Note Added: 0004312 | |
2017-04-21 11:24 | acuthbert | Note Added: 0004313 | |
2017-04-21 11:59 | acuthbert | Note Added: 0004314 | |
2017-04-21 12:00 | acuthbert | File Added: 26dev.png | |
2017-04-21 12:08 | acuthbert | Note Added: 0004315 | |
2017-04-21 12:16 | derick | Note Added: 0004316 | |
2017-06-23 08:30 | Till | Note Added: 0004359 | |
2017-06-26 08:02 | Till | Note Edited: 0004359 | |
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 | |
2017-12-21 04:50 | v1nce | Note Edited: 0004525 | |
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 | |
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 |
2020-03-12 16:33 | derick | Category | Remote Debugging => Step Debugging |