defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Add a toggle / game.config option to show which script is doing the print (DEF-3382) #1980

Open subsoap opened 6 years ago

subsoap commented 6 years ago

This is something I support in Log

DEBUG:SCRIPT: (script/path.script) ...

I'm debugging an old big project that hasn't been touched in a while and in current Defold engine there's a ERROR:SCRIPT: (null)(null) and I have no idea where it's coming from...

Edit: it was caused by a native extension which has since been changed. The script was attempting to call a function which had been renamed. Need better error message for this kind of situation if it's possible to detect.

britzl commented 6 years ago

It's likely this: https://forum.defold.com/t/all-error-messages-returning-error-script-null-null-solved/24949

DEF-3382

mathiaswking commented 5 years ago

Isn't it easier/more convenient to have your own logging function? Either by using something like "game.log(...)" or simply overriding "print()" to extra info?