atom-node-debugger icon indicating copy to clipboard operation
atom-node-debugger copied to clipboard

"Locals" acts weird

Open alexandernst opened this issue 9 years ago • 7 comments

It seems "Locals" is not emptied/filled with the variables from the current scope. Sometimes some variables are missing, sometimes variables get duplicated.

This is easily reproducible with randomly opening and closing the "Locals" element before/after stepping into a new context.

alexandernst avatar Feb 25 '16 17:02 alexandernst

I failed to reproduce this. Are there any errors logged to the console output (ctrl+alt+i to show) in atom?

codecontemplator avatar Feb 27 '16 17:02 codecontemplator

screen shot 2016-07-25 at 1 51 37 am

When the string is long, I cannot see the value... Anyway, The panel cannot be dragged, can it?


oh it can be dragged, but weird behaviour is happening..

tokidoki11 avatar Jul 24 '16 18:07 tokidoki11

Whenever I try to use it the locals dropdown is empty so I have to add everything I want to watch.

ztolley avatar Aug 01 '16 08:08 ztolley

I also see it having the wrong value for the local variable

thomassuckow avatar Nov 03 '16 00:11 thomassuckow

@alexandernst said:

Sometimes some variables are missing, sometimes variables get duplicated.

I can confirm this. I sometimes see double variables or occasionally a value from the previous/next variable. I thought I was going crazy. Often I set a variables in watches because they are not showing in locals or just to be sure.

E.g. loops like

for (let i = 0, keys = Object.keys(obj), len = keys.length; i < len; i++)

There is no i, keys, len etc in the local variables.

Check this scope for example: Local is not local, watch is local:

image

Redsandro avatar Nov 03 '16 09:11 Redsandro

It seems like mercury hg.array suffers from some kind of disease...

https://github.com/Raynos/mercury/issues/177

It could be worth trying to swap out the hg.array in the treeview in favor of the, not so convenient (in this case), hg.varhash.

@Redsandro Are you in a position to provide any reproduction steps for this bug?

codecontemplator avatar Nov 08 '16 20:11 codecontemplator

It's difficult. I encounter this now and again with big code. When I try to simplify this, into reproduction code, it starts working. :(

The problem with the hidden vars is easier. You got that one confirmed, or do you prefer reproduction code for that too?

Redsandro avatar Nov 10 '16 08:11 Redsandro