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
Breakpoint in getter func crashes debugger and game in editor #64452
Comments
I don't have much to add except this one has bit me pretty hard, too. I didn't notice it until after 3.5 left RC because at the time I wasn't very aggressively using getter/setters, but now I've devised a whole subset of GDscripting that extensively uses this. Oops. 💯 The GDscript debugger just becomes unusable if anywhere in the section being executed there is a getter or setter access. I also see |
Edit: Nevermind, I now watched the video and understood how to trigger the problem. I can reproduce it. |
I got a similar issue by mistakenly adding an array to itself. When running the game, the error was originally by trying to use an element of the array as something else, but rather than reporting that, the debugger chokes on the fact the array contains itself. |
Still happening on v3.5.1.stable.official [6fed1ff] |
Same if |
Just checked 3.5.2 stable, still in there, too. I also ported the code in my project to Godot 4. There was a lot of changes I had to make, but the core _get/_set code was unaltered. And breakpoints worked fine. No I haven't looked through the entire 4.x changelogs over the entire beta/RC series but I was told by someone else that they thought they saw debugger changes. It seems this is a regression between 3.3 (last time I saw this working) that was fixed in 4. |
Godot version
v3.5.stable.official [991bb6a]
System information
Windows 10
Issue description
Its currently not possible to debug a defined getter function.
The debugger will not show any variables in any of the points in the stack-trace.
Additionally when you continue to run it, the game just keeps hanging/paused and doesnt continue.
Additionally the editor prints a message depending on the assumed type of the var after resuming from the breakpoint, like:
editor/script_editor_debugger.cpp:1498 - Condition "cmd.get_type() != Variant::STRING" is true.
The following is demonstrating the different scenarios:
2022-08-15.18-34-41.mp4
Just ideas as an outsider:
From what i see it might be coming from the getter being used by the debugger to display the information of the var but its currently paused in there. So maybe the breakpoint is also affecting the debugger var evaluator or it gets caught in some kind of loop due to being inside the getter its trying to call. (i think it could be the former)
The expected behaviour would be for the debugger to work properly, show the vars and let me resume the game when telling the debugger to resume.
If this is not possible per se, it would be preferrable to have an error-message like "You cant debug getters for variables" so i understand where the error is coming from to save me time.
Steps to reproduce
As counter-point you can start without debugger and it works properly.
You can try it in the minimal reproduction project below.
Minimal reproduction project
Debugger_Problem_reproduction.zip
The text was updated successfully, but these errors were encountered: