LRDB
LRDB copied to clipboard
Add view support for tables with table keys
When a table is keyed by other tables, LRDB erroneously reports that the table is empty.
Using "next" on these tables returns JSON and is not parsed into an inspectable lua table.
A simple repro case:
a = {}
b = {}
b[a] = 1
b
will be displayed as empty in this case
Hate to resurrect a year old issue but I've just run into this, and it seems to be the case for all non-string table keys.
https://github.com/satoren/LRDB/blob/68378984d689e7ca36b56a7c625bb5a6e3d318ba/include/lrdb/debugger.hpp#L102-L107
Unfortunately this repo looks a little dead but finding a solution to this seems doable. not mapping lua tables 1:1 to json may be a decent start :p
If you allow for hide by key string duplicates, remove if (lua_type(L, -2) == LUA_TSTRING)
and use luaL_tolstring for key.
I think this is a good temporary fix, but it's not really ideal. For table keys that might be fine, but for things like numbers, you probably want to keep that type information somehow. I recognise that might not fit under the scope of this issue though