pkulchenko / MobDebug

Remote debugger for Lua.
Other
889 stars 192 forks source link

ref-loop protection is misleading #82

Open ildar opened 1 year ago

ildar commented 1 year ago

The following snippet

local e = {{1},{2}}
local t = {}

table.insert(t, { e[1],e[2] })
table.insert(t, { e[1],e[2] })

print('>>>', t[2][1], t[2][2])
print (require('mobdebug').line(t) )

shows that t[2] is ok but mobdebug is showing {nil,nil}. I suggest it's a kind of ref-loop protection but it's quite misleading. I suggest it show ref without expanding it.

This bug is found in ZBS quick watch.