godot-mod-loader icon indicating copy to clipboard operation
godot-mod-loader copied to clipboard

Added debugLine() method

Open aesereht opened this issue 2 years ago • 1 comments

Script pointing the top stack to get script name, function and line.

aesereht avatar Aug 24 '23 15:08 aesereht

Thank you for this PR! 🥇

The logs can be sometimes a bit confusing, but in most cases its very helpful.

Not so helpful:

WARNING ModLoader:Deprecated: DEPRECATED: The mod_main.gd _init argument (modLoader = ModLoader) is deprecated. Remove it from your _init to avoid crashes in the next major version. (since version 6.1.0)
Problem File - Source:res://addons/mod_loader/mod_loader.gd - Function:_init - Line:65

Helpful:

WARNING ModLoader:Deprecated: DEPRECATED: The var "mod_data" was removed, use "ModLoaderMod.get_mod_data_all()" instead (since version 6.0.0)
Problem File - Source:res://mods-unpacked/otDan-BetterModList/extensions/ui/menus/title_screen/title_screen_menus.gd - Function:_ready - Line:7

Would be nice if we could move the origin of the deprecation warning to the top of the debugger stack. image

So the mod dev only gets the deprecation error message and the origin in the debugger.

KANAjetzt avatar Aug 27 '23 09:08 KANAjetzt