Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Troubleshooting

When a program fails, first identify which stage reported the problem. The message and traceback include the source location.

SymptomLikely causeWhat to check
Parse errorSyntax the grammar does not acceptBraces, commas, string escapes, and function parameter syntax
Semantic errorA name, declaration, or statement is invalid in its scope, or a call or attribute can never succeedDeclare names before use; keep import/type/export at module scope; compare the call with the function's parameters and the attribute with the type's fields
NameError / AttributeErrorA runtime name or member is unavailableSpelling, module import, and attributes(value) in the REPL
TypeErrorAn operation received an unsupported value typeConstructor inputs, callback return values, and operator operands
IndexError / KeyErrorA list index or dictionary key is absentBounds checks, dict.get(), and list.index() returning nil
A found value is treated as missingindex() returned position 0, which is false in a conditionCompare the result with != nil, or use contains()
ValueError from split() or replace()An empty separator or a negative countLeave count out for no limit; use List(text) for characters
IOError / NetworkErrorA filesystem or HTTP operation failedPaths, permissions, connectivity, and a try/catch recovery boundary
invalid format specifier ".2": precision needs 'f' or 'e'A precision without a type letter in "{x:.2}"Write {x:.2f} for decimals or {x:.2e} for scientific notation

A reliable debugging loop

Reduce the failing code to a small .goblin file, then run it through the interpreter:

goblin run failing.goblin

Use goblin repl for inspecting values. attributes(value) lists the operations an object exposes, which is particularly useful for module values, responses, files, and custom types.

If build-exe fails after a program works with run, verify that the Go toolchain is installed and run the command again with the generated-build message visible. Report the Goblin source, command, full error text, and whether the interpreter path succeeds when filing an issue.

build-exe compiles against the same published Goblin runtime version as the installed CLI unless it finds a local source checkout (from the working directory or the executable's location). Development builds without embedded module-version information use a pinned runtime fallback. When developing Goblin itself, set GOBLIN_ROOT to the checkout path so compiled programs use your local runtime.