Open 3rd-Eden opened 11 years ago
What happens here is that function arguments are traced by when they enter the function, but are displayed at the point of call. As you can see on->(from, to) is the next function in the callstack. However there are 3 arguments to the emit call (event, from, to). So having an untraced call inbetween 2 traced calls (emit in this case) can disalign the arguments. I currently have no easy way of detecting this, since the call inbetween is untraced. I could trace arguments 'at call' and at entry, but this would slow things down by a factor of 2.
That sounds reasonable, I guess it's just something that needs to be documented then.
I've noticed that tracegl sometimes shows the wrong values when you are inspecting variables.
In http://cl.ly/image/2J0A2s130924 you can see that I hover over the
key
variable in the function. It give the correct value which isversion
. When I move to the bottom of theVersions.prototype.set
function and hover over thekey
variable again it actually shows the value from thefrom
variable instead of thekey
variable as seen in http://cl.ly/image/051U3n3B240w. And when I hover over thefrom
variable it shows the value ofto
.The code that was traced is open source and available at: https://github.com/3rd-Eden/versions