NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Debugger variable watch problem


Joined: 04 May 2011
Posts: 3
Reply with quote
I am using PhpEd 6.1 Professional.

I get a weird problem when trying to debug my program.
In my program I have an Object. Part of the object is an array called child_elements, which is an associative array of child elements.

I am trying to find a bug in my program, and I when inspecting the object it is shown differently depending on how watch it.
If I type in $this->child_elements[3]['DeliveryParams'] the object shown is different than if I just type in $this->child_elements[3] and then click next to 'DeliveryParams' to inspect it.

The problem might be easier to understand by looking at a couple of screenshots.
(I was unable to post the images here so I just supply the links like this...)
s6.postimg.org/xaczk9kk1/debug2.jpg
s6.postimg.org/58yy6kf9t/debug.jpg


If you look at these images you will see that the values are displayed differently even if they both show the same variable.
Whats going on here?

Any help is much appreciated!!

Dala
View user's profileFind all posts by dalaSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
I can think of 3 possible reasons why this may happen:
-you have some other statements in Watch that may change properties of your object
-your object changes itself upon evaluating
-your object returns different values depending on the way the property is accessed

With #1 -- it's easier to check if you remove all other Watch statements
With #2 -- try to make series of var_dump() for the properties to see if they change each time they are evaluated
With #3 -- check var_dump() fro those two variants

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[resolved] Debugger variable watch problem
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