mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
This commit is contained in:
parent
f704113abe
commit
d1dcb40d56
32 changed files with 813 additions and 95 deletions
|
|
@ -2942,17 +2942,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue