As a Roblox developer, it is currently too hard to interact with tables when an instance is used as an index in a table.
local parts = {}
for i=1, 10 do
local part = Instance.new("Part", workspace)
part.Name = "Part" .. i
parts[part]=i
end
print("Expressive Window:")
print(parts)
print("Correct:")
for i, v in pairs(parts) do
print(i, "=", v)
end
… will print:
In the Expressive Output example above, it’s impossible to know which part is being referenced.
If Roblox is able to address this issue, it would improve my development experience because it will allow knowing the correct instance name, not a single reference.
Edit
Also, it would be very important to show the instance names in the index alphabetically ordered.
Thanks for bringing this back up. I’ll brush the dust off of the ticket we originally filed for this and take a look (though if I recall there were some issues that made it harder than it looks from a technical standpoint).
Hello,
We have fixed this issue. If you have instances as table keys, we will also have the table name as part of this key in debugger views (output window, debugger watch window, debugger variable mouse-over.)
Thank you for your patience.