As a Roblox developer, it is currently too hard to watch a value in a complex expression while debugging.
For example, if during debugging I come across the following expression: MyTable[UserId][SomeName].SomeValue
or ((a + b * c) ^ 2)
and I want to watch the resulting value, I have to:
- Select the entire expression
- Right-Click
- Add Watch
- Go to the Watch window
- Switch to the “My Watches” tab
- Search visually for the expression previously added
- And to make matters worse if I advance a line in debugging, the focus of the My Watches list is lost and I have to search the entire list again.
Currently, Studio already allows you to query a value by hovering the mouse over a simple variable.
My suggestion is:
- Select expression to be inspected
- Hover the mouse over the selection
- Studio will show the result at the mouse location, as it already does with single variables
For example, when debugging this code:
local d = {a = 1, b = 2}
local aa = 'a'
local bb = 'b'
if d[aa] == 1 and d[bb] == 2 then
print('ok')
end
… and I want to inspect the result of the expression d[aa] == 1 and d[bb] == 2
, I’d just select the expression and hover the mouse over the selection:
… and instead of the single result shown next to the mouse as the example above, it should show the result as shown in “My Watches”, since it’s about the selected expression.
If Roblox is able to address this issue, it would improve my development experience because this will make the process of debugging and inspecting values much easier.