-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add a way to print a backtrace without stopping/crashing Godot #3062
Comments
You can use |
I think you can try conditional breakpoints. |
Simple patch which works only for Linux(I have no idea if this code should be inside OS class or somewhere else) patch.txt |
godotengine/godot#91006 implements the ability to print GDScript backtraces at any time, but it won't print the C++ side of the backtrace. |
Describe the project you are working on
Godot Engine
Describe the problem or limitation you are having in your project
For now Godot print some error messages when starts godotengine/godot#49623 so checking each error with gdb or Qt Creator is slow.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Function like
print_backtrace()
could print exactly same backtrace as in crash e.g.but without crashing entire app, to help find functions which executed current one.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Not sure but maybe extracting code from crash handler should be enough(this needs to be done for each platform)
https://github.com/godotengine/godot/blob/8f7f5846397297fff6e8a08f89bc60ce658699cc/platform/linuxbsd/crash_handler_linuxbsd.cpp#L48-L121
https://www.gnu.org/software/libc/manual/html_node/Backtraces.html
If this enhancement will not be used often, can it be worked around with a few lines of script?
Cannot print C++ backtrace from GDScript(but with this feature this could be possible but probably useless)
Is there a reason why this should be core and not an add-on in the asset library?
This cannot be added as addon
The text was updated successfully, but these errors were encountered: