Incorrect “not in scope” in “My Watches” while debugging

I have this table CelulaAux that is declared local CelulaAux at the beginning of the script.
I want to watch its content.
While debugging, I can watch it only pointing the mouse over its name:

But if I add it to “my watches”, I get “not in scope”:

Why, if at the same time I can see its content using the mouse over the name, but I can’t see it in “my watches”?

3 Likes

Hi rogeriodec_games,

Thanks for the report! Can you take a look at How to post a Bug Report and follow the instructions there? Including steps to reproduce the issue will help us investigate the issue. Thanks!

3 Likes

It’s simple:

  1. Create a LocalScript inside StartedGui like this:
local d = {a=1, b=2, c=3}
local function x()
	print(d)
end
x()
  1. Set a breakpoint to line 3 (print):

  2. Play (F5) and stop the mouse over the “d” dictionary (there you can see the complete dictionary):

  3. Right-click “d” and Add Watch:

  4. In the Watch window, you’ll get “not in scope”:

Thanks for the report! We’ve filed this internally and we’ll follow up here when we have an update for you.

2 Likes

Any news about that?
This bug gets in the way because all variables in the scope above the current function are not being identified.

Hey, this is an important bug and it’s open for ALMOST 5 MONTHS!
Currently, it’s very hard to debug a table that is outside a function…
“Add Watch” simply doesn’t work for this situation.
So, using the example above, if I want to watch that table, I have to:

  1. Stop the mouse over any mention of the table in any line of the code
  2. Manually unfold all levels (one by one!) to find what I want inside the table (think about a table with 5 levels, every time!!!)
  3. But, if I move the mouse out of the code, or step over (F10) for a new line, the table will disappear, and I have to repeat all steps again!

Please, fix this!

1 Like