View Issue Details

IDProjectCategoryView StatusLast Update
0002126XdebugStep Debuggingpublic2022-12-08 18:51
Reporterdaniel.siepmann Assigned To 
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