Expressive Output Window / Debugger - Show instance name instead of reference inside a table

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.

11 Likes

This request must also be extended to the debugger. When unfolding a table while debugging, the same happens:

@IcyTides
This is a suggestion from almost 3 years…
Do you think it’s possible for this to be implemented?

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).

1 Like

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.
Screenshot 2024-05-15 at 8.57.38 AM

3 Likes