Allow specifying what script is opened and to where when clicking on an output line

As a Roblox developer, it is currently impossible to control where the output opens when you click on a line in it. This is annoying, because it means that if you have any function that acts as a loose wrapper around printing or warning, you lose a valuable UX feature.

As an example, consider this example:

local function printf(message, ...)
  print(string.format(message, ...))
end

printf("an example message that does %s", "formatting!")

If you run this script, it will (as expected) print an example message that does formatting! but if you click on it in the output, it will open you to line 2. This makes sense because it’s where the actual printing occurs, but it is not very useful as a developer. I would instead like it to point to line 5, which is the printf call.

This same situation can happen across scripts if you e.g. have a printf module that you’re using instead of having it be in the same script. It is annoying!

My specific use case is a logging module that does some processing on top of the print calls. It’s not practical to use it in replacement of print or warn or even error without some way to adjust how the Output behaves though, because it impacts debugging so significantly. Right now it’s basically just noise on top of the real output, and I’d like that to change.

If Roblox were to add this feature, it would significantly improve my day to day life because a lot of code I work with uses indirection for outputting and it would let me use the UX feature built into the Output better.

This is a weird spot between an engine and a studio request: it would have to be added to the engine, but it only matters in Studio. Hopefully I chose right by selecting Studio. :slightly_smiling_face:

7 Likes