View Issue Details

IDProjectCategoryView StatusLast Update
0002126XdebugStep Debuggingpublic2022-12-08 18:51
Reporterdaniel.siepmann Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64-linuxOSUbuntuOS Version20.04.5 LTS
Product Version3.1.5 
Target Version3.2devFixed in Version3.2.0 
Summary0002126: Problems with retrieving global variables
Description

It is currently not possible to get information about global variables.

I've tried with vdebug (within vim) and dgbpClient from xdebug.org.

Accessing a globals variable will result in Error(300): can not get property.

It might be an issue with some configuration on my end, but I couldn't find anything related on xdebug.org

Steps To Reproduce

Start steb debugging using dbgpClient.
Execute property_get -n $GLOBALS
Execute property_get -n $GLOBALS['MY_COBJ']

TagsNo tags attached.
Operating SystemUbuntu 20.04.5 LTS
PHP Version7.3.30-7.3.39

Activities

daniel.siepmann

2022-10-13 09:07

reporter   ~0006397

Possible workaround is to import the variable for debugging reasons, e.g.:

global $MY_OBJ;

Xdebug then can fetch info of this local variable.

derick

2022-10-13 10:37

administrator   ~0006398

I can confirm this, and will need to investigate. It might not be possible in PHP 8.1+ though, as it changes the way how GLOBALS are handled.

derick

2022-10-13 10:37

administrator   ~0006399

As an additional note, a fix for this would only go into Xdebug 3.2.x, which will be PHP 8 only.

derick

2022-10-14 16:50

administrator   ~0006401

https://github.com/xdebug/xdebug/pull/863

Issue History

Date Modified Username Field Change
2022-10-13 09:00 daniel.siepmann New Issue
2022-10-13 09:07 daniel.siepmann Note Added: 0006397
2022-10-13 10:37 derick Assigned To => derick
2022-10-13 10:37 derick Status new => confirmed
2022-10-13 10:37 derick Note Added: 0006398
2022-10-13 10:37 derick Note Added: 0006399
2022-10-14 16:50 derick Status confirmed => assigned
2022-10-14 16:50 derick Note Added: 0006401
2022-10-14 16:50 derick Target Version => 3.2dev
2022-11-02 10:40 derick Status assigned => closed
2022-11-02 10:40 derick Resolution open => fixed
2022-11-02 10:40 derick Fixed in Version => 3.2dev
2022-11-02 10:40 derick Summary Error(300): can not get property for $GLOBALS => Problems with retrieving global variables
2022-11-10 09:50 derick Fixed in Version 3.2dev => 3.2.0RC2
2022-12-08 18:51 derick Fixed in Version 3.2.0RC2 => 3.2.0