MantisBT - Xdebug
View Issue Details
0000469XdebugUsage problems (Wrong Results)public2009-09-05 00:562009-10-05 01:50
dredies 
 
normalmajoralways
closedfixed 
2.0.0dev 
 
Mac OS X 10.6 (Snow Leopard)
5.3.0
0000469: xdebug 2.0.5 with php 5.3 - context_get for function variables always appear as "unitialized" - Mac OS X 10.6 (Snow Leopard)
Just upgraded to Mac OS X 10.6 (Snow Leopard) and now when I try to debug a php page the variables always appear as "unitialized" once you step into a function.
No tags attached.
Issue History
2009-09-05 00:56drediesNew Issue
2009-09-05 00:56drediesOperating System => Mac OS X 10.6 (Snow Leopard)
2009-09-05 00:56drediesPHP Version => 5.3.0
2009-09-05 00:56drediesXdebug Version => 2.0.5
2009-09-07 00:01derickNote Added: 0001064
2009-09-07 00:01derickStatusnew => closed
2009-09-07 00:01derickResolutionopen => fixed
2009-09-09 10:00drediesNote Added: 0001066
2009-09-09 10:00drediesStatusclosed => feedback
2009-09-09 10:00drediesResolutionfixed => reopened
2009-09-09 11:48derickNote Added: 0001067
2009-09-11 15:00StephenKingNote Added: 0001068
2009-09-11 15:01StephenKingNote Edited: 0001068
2009-09-12 18:44cesaricNote Added: 0001070
2009-09-12 18:55cesaricNote Edited: 0001070
2009-09-13 21:42htaufikNote Added: 0001072
2009-09-19 00:11ottoNote Added: 0001076
2009-09-19 00:11ottoNote Edited: 0001076
2009-09-25 08:47ottoNote Added: 0001077
2009-10-03 03:06tanobNote Added: 0001079
2009-10-05 01:50derickNote Added: 0001081
2009-10-05 01:50derickStatusfeedback => closed
2009-10-05 01:50derickResolutionreopened => fixed
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

Notes
(0001064)
derick   
2009-09-07 00:01   
This has been fixed in the CVS version already.
(0001066)
dredies   
2009-09-09 10:00   
Now you don't see this problem in functions anymore, but now you see this problem if you assign values to variables in an external file, then include that file and the variables defined in the external file will now show as "unitialized"
(0001067)
derick   
2009-09-09 11:48   
Can you please then provide:

- a minimal code example (2/3 files with minimal content)
- an xdebug remote log for a debugging session where this issue occurs (for
  information on how to do this: http://xdebug.org/docs/all_settings#remote_log [^]
(0001068)
StephenKing   
2009-09-11 15:00   
(edited on: 2009-09-11 15:01)
I also have this problem with OS X 10.5, PHP 5.3.0 and Komodo 5.2 beta.

Although I've just checked out from CVS, the problem persists in this bug's initial manner.

The following code results in "uninitialized" $x and $y INSIDE the function:

<?php

function foo() {
    $x = 1;
    $y = 2;
}

foo();

?>

xdebug-log:
http://pastebin.com/m35d50c54 [^]


P.S: It would be really nice to have permissions to attach files here :-P

(0001070)
cesaric   
2009-09-12 18:44   
(edited on: 2009-09-12 18:55)
Confirming the problem with OS X 10.6, Apache 2.2.11, PHP 5.3. The variables pane in Eclipse always shows as uninitialized but if explicitly create a "watch expression", I can see the values. Here's a screen shot: http://cesaric.com/wp-content/uploads/2009/09/xdebug.jpg [^]

I compiled 2.0.5 from CVS with same results. Also tried 2.1 and had other errors (child count error...) in addition to still not seeing the variables.

Any suggestions? Tried changing around settings like xdebug.show_local_vars with no luck. Also, have the exact same Apache/xdebug/php version on Windows XP and works just fine.

(0001072)
htaufik   
2009-09-13 21:42   
Any solutions for this issue?
(0001076)
otto   
2009-09-19 00:11   
Same problem here with NetBeans (6.7.1 and nightly from 20090915) and Komodo 5.2.0 on Snow Leopard with default php 5.3.0 and xdebug 2.0.5.

I used StephenKing's code and have put up a remote log here: http://pastebin.com/m71988e29 [^]

(0001077)
otto   
2009-09-25 08:47   
I've now tried with 2_0 cvs and the issue remains.
(0001079)
tanob   
2009-10-03 03:06   
I can also confirm this problem, at least on Snow Leopard, with PHP 5.3.0 and XDebug 2.0.5.

Notice that if you add a watch expression that evals the variable content, you can see its value.
(0001081)
derick   
2009-10-05 01:50   
This is now fixed in CVS (HEAD only).