View Issue Details

IDProjectCategoryView StatusLast Update
0001138XdebugUncategorizedpublic2016-11-29 23:55
Reporterduderion Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformPHPStormOSOSXOS Version10.10
Product Version2.3.2 
Summary0001138: Xdebug is not able to evaluate arrays
Description

If i setup a Project with CakePHP3 under PHPStorm8, Netbeans8 ... with MAMP (Simple MAC LAMP alternative), i'm able to set a breakpoint, but on lots of values i receive 'can not get property'. As it happens with PHPStorm AND Netbeans, it seems like it is a problem with Xdebug. I tried 2.2, 2.3.2 and after it still failed, i install 3.0.0-dev from git. still same same.

I have a screenshot of the debugging state. You see, there are values being evaluated, but others aren't. The Object, where i discovered this is an "Entity Object"

http://91.250.118.97/private/xdebug_phpstorm_cake3.png

i talked to some developers of cakephp, and they told me that "properties" or "accessible" are simple and plain old php arrays.

Steps To Reproduce

OSX
MAMP
cakephp3 install
generate easy Entity Object in one of the controllers

e.g. $e = new Entity(['id'=>5]);

set a breakpoint after it, and you'll see that not all values are accessible.

TagsNo tags attached.
Attached Files
screenshot.png (114,159 bytes)   
screenshot.png (114,159 bytes)   
Operating System
PHP Version5.6.0-5.6.4

Activities

derick

2015-04-09 13:16

administrator   ~0003060

Could you perhaps come up with a lot simpler reproduce case? As a preference, just a single script without dependencies.

If not, as I have no mac and hence no MAMP, and I don't know CakePHP, I need a reproducible package. I doubt it's related to OSX/MAMP though, so if you can pack up something that I can easily "unpack and run", and provide a "remote debugging log" (see http://xdebug.org/docs/all_settings#remote_log), then I can perhaps find and fix this.

duderion

2015-04-09 13:39

reporter   ~0003061

hiho Derick,

you find a webproject example here. http://91.250.118.97/private/xdebug.zip

simply download & unpack

cheers

derick

2015-04-09 13:53

administrator   ~0003062

I can run this - and set the breakpoint at the instructed line. However, the screenshot that you posted shows $initFunctions being open, which has the "properties" or "accessible" properties. But in the code that you gave me, there is no such variable at all.

In the context of the $e variable, _accessors and _properties "work for me". I'll add a screenshot too.

duderion

2015-04-09 14:26

reporter   ~0003063

yes you are right, the code is sent you is just a basic example.

here is my output of $e

http://91.250.118.97/private/xdebug.png

derick

2015-04-09 14:46

administrator   ~0003064

I see something fishy going on, even without xdebug loaded when requesting index.php - what is your exact PHP version?

derick

2015-04-09 20:07

administrator   ~0003065

I think I found a bug in PHP here - that I can reproduce even when Xdebug is loaded. Can I pass your "xdebug.zip" onwards into the PHP.net bugs system?

duderion

2015-04-15 13:45

reporter   ~0003069

yea ofcourse

duderion

2015-04-15 13:45

reporter   ~0003070

my exact php version is 5.6.2

duderion

2015-04-28 09:19

reporter   ~0003074

hi Derick,

are there any efforts concering the php bug ;) ?

duderion

2015-05-02 15:12

reporter   ~0003076

its strange, that _properties "works" for you.

duderion

2015-05-02 16:27

reporter   ~0003077

Hi Derick,

oh my f***** god, it was an issue with php5.6.x. I ran the project with 5.5.18, and properties appear as normal . so it is obviuosly a bug with 5.6

thanks a lot !!!

Duderion

derick

2016-11-29 23:55

administrator   ~0003857

I'm closing this, as it's expected to be a problem with PHP itself.

Issue History

Date Modified Username Field Change
2015-04-09 13:13 duderion New Issue
2015-04-09 13:16 derick Note Added: 0003060
2015-04-09 13:16 derick Assigned To => derick
2015-04-09 13:16 derick Status new => feedback
2015-04-09 13:39 duderion Note Added: 0003061
2015-04-09 13:39 duderion Status feedback => assigned
2015-04-09 13:53 derick Note Added: 0003062
2015-04-09 13:53 derick File Added: screenshot.png
2015-04-09 14:26 duderion Note Added: 0003063
2015-04-09 14:46 derick Note Added: 0003064
2015-04-09 20:07 derick Note Added: 0003065
2015-04-15 13:45 duderion Note Added: 0003069
2015-04-15 13:45 duderion Note Added: 0003070
2015-04-28 09:19 duderion Note Added: 0003074
2015-05-02 15:12 duderion Note Added: 0003076
2015-05-02 16:27 duderion Note Added: 0003077
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)
2016-11-29 23:55 derick Note Added: 0003857
2016-11-29 23:55 derick Status assigned => resolved
2016-11-29 23:55 derick Resolution open => no change required
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized