When you talk to Studio, Studio talks back! If you talk in code, it mostly responds with messages in the Output Window. Today we are happy to present new ways for Studio to express itself with some major upgrades to the output! You can turn these on now from the Studio Beta Features menu!
Lua/Luau is all about tables - they’re everywhere! And now you can easily inspect them. With this update, using the print function on a table will print the full table contents with an expandable, explorable interface. Some important options:
- By default, tables print collapsed. You can change this to print fully expanded tables if you’d like
- By default, tables memory address is not displayed. You can change this to show the memory address for all tables in-line
No more being forced to write custom table unrolling functions - it just works! Print() any table! Print() every table! Just watch out for Little Bobby Tables - that guy is trouble.
Messages written to the Output Window can be classified by their type or source. Using the filter dropdowns in the top left, you can restrict the output view to only show the desired messages. Filter options include the following:
- Message Type:
- Output - default message type
- Information - developer-facing Studio output
- System - saved place, auto-saved place, etc.
- Warning - you shouldn’t keep doing what you did
- Error - something has gone horribly wrong
- Message Context (where the message originated from - Edit/Client/Server, mostly)
The Output Window can contain a lot of messages. To help find exactly the one you want, we’ve added our good friend Search! The Search window scans all messages and, importantly, respects type and context filters. Common features such as matching case, enforcing whole word match and regex (for the ambitious!) are also included.
Happy developing! Please provide any feedback below - we are actively iterating on this functionality!
P.S. If you want to access the next level of debugging capability beyond print(), check out the built-in Lua debugger. It just got a big upgrade with Universal Breakpoints Beta - One Breakpoint to Rule Them All!