kiddkai / atom-node-debugger

A Nodejs Debugger For Atom
MIT License
265 stars 75 forks source link

"Locals" acts weird #145

Open alexandernst opened 8 years ago

alexandernst commented 8 years ago

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.

codecontemplator commented 8 years ago

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

tokidoki11 commented 8 years ago
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..

ztolley commented 8 years ago

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

thomassuckow commented 7 years ago

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

Redsandro commented 7 years ago

@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

codecontemplator commented 7 years ago

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?

Redsandro commented 7 years ago

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?