NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Watch debug window shows variable value before created
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
I just changed my setup to PHP7.1.13 Win32-VC14-x64 and loaded the dbg-php-7.1.dll v8.2.12.16476 x86_64_VC14 from PhpED build 18044.

Everything works ok, except that the watch window show all variables in a script no matter if they are created or not at the current breakpoint.

This is anoying when debugging a script with many variables. It is much better when the recent create variable is shown on the top line of the window.

I didn't find any settings to fix this.

Any suggestion?

Screenshot: http://prntscr.com/j3znov
View user's profileFind all posts by HoTShoTSend private message
Veteran

Joined: 22 Sep 2005
Posts: 113
Reply with quote
Answer from NuSphere Support <support@nusphere.com>

I'm sorry, that's the way PHP works now. It pre-populates array of variables at compile time instead of populating them in hash table as they are getting assigned -- as it worked before. It is done this way for performance reasons and we can't change that.
Debugger is just a mirror -- it reflects what's going on inside PHP.
View user's profileFind all posts by HoTShoTSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7887
Reply with quote
Quote:
if they are created or not

these days all the local variable are created when the function or method they belong to is executed. Does not matter you initialize them or not. They are created all at once. Php core reference to this technology as "compiled variables" and corresponding constants in source code have CV prefix (or suffix).
Debugger can't distinguish if variable was initialized with NULL or not initialized at all.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Watch debug window shows variable value before created
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic