godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.94k stars 3.22k forks source link

A section dedicated to error messages and debugging #368

Open eon-s opened 7 years ago

eon-s commented 7 years ago

I see a lot of questions from people that comes clearly not from the programming world, saying they can't access a node or they get "Attempt to call function X in base 'null instance' on a null instance", they may waste a lot of time just because is not clear that the message means a variable is null.

Another cryptic even for programmers are the "Condition det==0 is true" and others like this.

So, a list of common error messages could be helpful.

A tour around the debugger to know the available tools to track errors and other things could be in the same section too.

StraToN commented 7 years ago

A new page is planned in docs regarding the debugger usage in the editor. However, the debugger panel will change in Godot 3.1, so we'll wait until then to write this page.

Or maybe should we start it and fill it with error messages explanations?

akien-mga commented 6 years ago

See also #173 and #298.

eon-s commented 4 years ago

The debugging part may be more or less covered, some examples may be handy, like the classic wrong path on get_node and trying to call a method or get a property of a null reference.

So what is still missing is a list of engine errors (the cryptic ones) to help the debugging process.

Calinou commented 4 years ago

So what is still missing is a list of engine errors (the cryptic ones) to help the debugging process.

Shouldn't we fix this on the engine side by adding messages to all error macros? It'll take a long time, but it'll definitely be more robust over time. We could also detect cases like the infamous "Socket error: 10054" to tell the user the game process has crashed.

eon-s commented 4 years ago

Fixing on the engine side would be better, maybe with the upcoming refactor some better error reporting system could be applied, it should be a formal proposal but I do not know all the error types present on the engine to be able to make a decent one.