-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Improve tool script debugging #5983
Comments
If you are brave you can run godot editor with -d and use commandline On Jul 30, 2016 21:54, "Marc" notifications@github.com wrote:
|
@Zylann Is this still relevant in the current |
Technically there still isn't a call stack printed, however I now use the commandline debugger, which is still the only way to debug a tool script running in editor at the moment. |
I want to make a plugin and to my surprise found out one cannot debug them. |
@wyattbiker while using the command line debugger I was able to inspect the code and variables when a problem occurs, however I don't know how to setup breakpoints, so I've been using prints and |
Didn't know about the breakpoint keyword. Nice to have. The debugger has way too many issues. You can also use prints and run inside the editor. Of course you have to inactivate and activate plugin from Project when you make changes. I would like to understand what the tech road blocks are that one cannot debug plugins. |
@wyattbiker because if you suspend plugin code running in the editor, that means you suspend the main loop, which includes input handling and drawing of the interface. It is consistent with what happens when you debug games as well. The debugger might be working but the whole editor will be frozen... so that's why it only gets usable from command line, I guess. |
This comment has been minimized.
This comment has been minimized.
@q4a Please don't bump issues without contributing significant new information; use the 👍 reaction button on the first post instead. |
Just a question why the plugin code must run in the same debuger thread? |
I can't understand how the commandline debugger works. I've tried the "-d" option in Godot 3 and 4 and I only get debug messages in the terminal. Is that all? I'm still fairly new to Godot, so I might be missing something but I think the following would be the feature that Godot needs to fulfill this issue and more. There could be two instances of Godot, the one I'm testing my plugin on, and the one where I'm working on the plugin and debugging it. Remote debugging would be needed for this. This way one instance debugs another instance and there are no possible lockups. This wouldn't only be useful for plugins but for developing the Godot editor and any Godot based apps. Is that already possible? |
I am currently developping a GDScript editor plugin, and just like developping a game, I make mistakes and am getting countless errors, yay!
But the problem here is that I only get the error and the line where it occurred. I am currently spending a lot of time trying to figure out a bug happening everytime I use Ctrl+S that makes the editor hang for 30 seconds (it was 5 minutes when it first occurred!). Because I edit the tool in the editor, it is becoming a PITA to debug. Godot even froze at some point but not a clue what happened.
It would be a great improvement if we could get the call stack of tool script errors, because mine just tells
invalid index in get_value(x,y)
, which can happen in a lot of different ways, so I'm screwed to the point I have to print everywhere (making the test even longer!), erase stuff and wait for a while everytime just to find the culprit code path.FYI: the bug was caused by #5984
The text was updated successfully, but these errors were encountered: