provegard / ncdbg

A debugger for Nashorn that uses Chrome DevTools as frontend
BSD 3-Clause "New" or "Revised" License
31 stars 5 forks source link

Document/handle slot sharing for locals #83

Open provegard opened 6 years ago

provegard commented 6 years ago

Hovering over a local variable may show the contents of another local variable. I think this is due to that the JVM optimizes slot usage. Check whether or not this is the case and document it (or work around it if possible).

benoitcerrina commented 6 years ago

I saw this happening too. But not always.

benoitcerrina commented 6 years ago

note that when this happens it is not just the hover which is incorrect. Typing the local variable name in the console will return the wrong value.
The "Local" tree was still showing the correct values in front of the correct name though

provegard commented 6 years ago

Yes I saw the same. I don't think there is much to do. When I added forced uses of all locals, this behavior disappeared.