1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #91006 from reduz/live-backtrace

Ability to print and log script backtraces
This commit is contained in:
Thaddeus Crews
2025-04-24 17:18:52 -05:00
32 changed files with 813 additions and 95 deletions

View File

@@ -2949,17 +2949,14 @@ GDScriptLanguage::GDScriptLanguage() {
script_frame_time = 0;
#endif
int dmcs = GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "512," + itos(GDScriptFunction::MAX_CALL_DEPTH - 1) + ",1"), 1024);
if (EngineDebugger::is_active()) {
//debugging enabled!
_debug_max_call_stack = dmcs;
} else {
_debug_max_call_stack = 0;
}
_debug_max_call_stack = GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "debug/settings/gdscript/max_call_stack", PROPERTY_HINT_RANGE, "512," + itos(GDScriptFunction::MAX_CALL_DEPTH - 1) + ",1"), 1024);
track_call_stack = GLOBAL_DEF_RST("debug/settings/gdscript/always_track_call_stacks", false);
track_locals = GLOBAL_DEF_RST("debug/settings/gdscript/always_track_local_variables", false);
#ifdef DEBUG_ENABLED
track_call_stack = true;
track_locals = track_locals || EngineDebugger::is_active();
GLOBAL_DEF("debug/gdscript/warnings/enable", true);
GLOBAL_DEF("debug/gdscript/warnings/exclude_addons", true);
GLOBAL_DEF("debug/gdscript/warnings/renamed_in_godot_4_hint", true);