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”?

7 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”:

1 Like

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

3 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!

r

Please, fix this!

5 Likes

This is quite annoying…

I am breaking in and want to add a local variable to My Watches

  • All good

  • Pressing “Stop” stops the test and leaves me with a kind of understandable My Watches

  • Pressing “Play” and breaking in now suddenly doesn’t have the watched variable in scope

  • If I try to update the expression to what it already is it will still be not in scope

  • And If I try to add it again as a new expression

  • Nothing happens

  • Deleting the watched expression tho

  • And then typing it again (or add it by right clicking the variable in the code)

  • Will bring it in scope

This makes debugging in Roblox Studio almost impossible. Atleast if you want to remain sane.

1 Like

Any updates to this? It has been over a year this bug has been reported.

2 Likes

This is an issue with Roblox support: when a reported bug is resolved, it is rarely reported within the original thread like this one.
I currently have DOZENS of bugs reported and am required to periodically review one by one manually to see if this bug has been resolved or not.
In the case of this specific topic, I found that it has already been resolved.
I ask Roblox support to pay more attention to informing the solicitation when a bug has been resolved, within the original topic.

Fixed? When? Where?

Last I checked I still had this problem.
The debugger in Studio makes me exit the problem within 1 hour.

Follow the example I posted: Incorrect “not in scope” in “My Watches” while debugging - #3 by rogeriodec_games
I did it again today and it’s fixed.
You can put here your problem, with examples, steps, and screenshots.

This topic was automatically closed after 13 days. New replies are no longer allowed.