godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.47k stars 21.27k forks source link

Error messages when plugins are faulty not normally shown #30377

Open Sslaxx opened 5 years ago

Sslaxx commented 5 years ago

Godot version: 3.1.1

OS/device including version: N/A

Issue description: Related to https://github.com/jebedaia360/Rakugo/issues/153

Attempting to set up Rakugo with Godot, I noticed the plugin.gd script does not work. However by default Godot does not report why it failed; it does not tell you what the errors are, unless you are running Godot from the terminal.

From inside Godot a

From the terminal

SCRIPT ERROR: GDScript::reload: Parse Error: Identifier 'Rakugo' is not declared in the current scope.
   At: res://addons/Rakugo/nodes/rakugo_menu.gd:12.
ERROR: reload: Method/Function Failed, returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:580.
SCRIPT ERROR: GDScript::reload: Parse Error: Could not fully preload the script, possible cyclic reference or compilation error. Use 'load()' instead if a cyclic reference is intended.
   At: res://addons/Rakugo/plugin.gd:65.
ERROR: reload: Method/Function Failed, returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:580.
SCRIPT ERROR: GDScript::reload: Parse Error: Identifier 'Rakugo' is not declared in the current scope.
   At: res://addons/Rakugo/nodes/rakugo_menu.gd:12.
ERROR: reload: Method/Function Failed, returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:580.
SCRIPT ERROR: GDScript::reload: Parse Error: Could not fully preload the script, possible cyclic reference or compilation error. Use 'load()' instead if a cyclic reference is intended.
   At: res://addons/Rakugo/plugin.gd:65.
ERROR: reload: Method/Function Failed, returning: ERR_PARSE_ERROR
   At: modules/gdscript/gdscript.cpp:580.

Steps to reproduce: Use an addon with a plugin.gd that has an error of some kind.

Minimal reproduction project: In this case, I was using https://github.com/jebedaia360/Rakugo/commit/33b09b6685289f0e3aabf0254064a76b814575c7

Sslaxx commented 4 years ago

I note that 3.2 has a "Copy text" button on this dialogue, which seems especially useless considering that it still does not actually tell you anywhere outside of the console/terminal what the actual error is. All that "Copy text" does is to copy the text in the dialogue box, not any actual (useful) error message(s).

KoBeWi commented 3 years ago

Still valid in 3.2.4 beta4 Although on another look, it does tell you which file failed, so it's easy to check the error. Maybe a button to open the script for you would be useful.