-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
variables created inside code blocks do not appear in debug window #38206
Comments
Not for me, does it all of the time. Regardless, once is once too many :) |
I dunno if this makes a difference, but this function call was within the physics process function, not the ready function. |
Can confirm, seeing this every time when setting a breakpoint in an if statement block in the physics process function, that is down from where the variable is declared or initialized. If I set a breakpoint on the initialization it's fine, but any line after that in the if statement block it doesn't show up in the debugger. Works if stepping line by line. |
Also, I'm only seeing this behavior when the breakpoint is set on the last line of the if statement block (or stepping to the last line with the debugger). It looks like this is associated with the line that is chosen for the local variables to loose scope on. It's assigning it to be the last line of the block instead of the line after. |
I can confirm this too, well spotted. So it's somebody got an index-1 problem ;) I guess the fix for now is to add a pass or non-statement to the end of a block.... |
Duplicate of #53442 |
Godot version:
3.2.1
OS/device including version:
Linux Mint
In the screenshots below the breakpoint is at line 46, the line after 'newpos' is initialised.
If 'var newpos' is declared inside the if block (the second image), the debugger is not picking up the variable to put inside the debugger, and nor does hovering show any tooltip unless newpos is declared outside the if statement.
i.e. it appears the godot debugger is only tracking variables created at the current top level scope of a function.
The text was updated successfully, but these errors were encountered: