Topic cluster
Development and debugging
Building inspecting testing and diagnosing Zotonic applications and modules.
View topic page29 items
The remaining keywords do not make a useful further split. All matching documentation is listed below.
Automatic recompilation and file watching
Zotonic's file handler watches source changes when a supported watcher is available. Erlang, templates, dispatch files, and assets have different handlers.
Build and serve frontend assets
Keep source files such as SCSS in priv/lib-src and compiled assets in priv/lib. Use an app-level Makefile that delegates asset work to the source directory's Makefile.
Build and serve frontend assets
Keep source files such as SCSS in priv/lib-src and compiled assets in priv/lib. Use an app-level Makefile that delegates asset work to the source directory's Makefile.
Build and start Zotonic
Compile Zotonic, start it, check the status page, and continue to your first site.
Check a rendered template
Render the changed page with realistic content. Include missing optional fields, a long title, several list items, and a second language when applicable.
Check template references
Open Cross-reference check of templates in the Development page and run the check. Read each reported reference with the active module set in mind.
Choose checks for a change
Choose checks for a change.
Command-line reference
Look up the syntax, requirements, and effects of each bundled command.
Compile changed code and load modules
Use make for the normal project build. On a running development node, the CLI also provides focused operations:
Connect to the running Erlang shell
From the checkout root:
Contribute a Zotonic change
Build the checkout, verify the change, and send a focused pull request.
Create a reusable module
Create apps_user/zotonic_mod_garden with the following files. This example adds a discoverable module without starting an extra process.
Create your first site
Create the garden blog, open it in your browser, and sign in to its admin.
Enable the Development module
Sign in to the local site's admin as an administrator. Open the module management page, find Development (mod_development), and activate it if necessary.
Find registered observers
Open Show an overview of all observers from the Development page. Find the notification and inspect the registered callbacks and their order.
Find the status site and your site's admin
The status site manages the running Zotonic installation. A site's /admin manages that site's content and enabled modules. They have different scopes and can use different credentials.
Inspect template dependencies
Open Dependency graph of all available templates from the Development page. Use the graph to understand inheritance and include relationships before changing a shared template.
Recompile code and refresh discovery
Use compilation for changed Erlang source, loading for changed BEAM files, and an index refresh when new templates or application files are not discovered.
Reload the browser after source changes
Open System → Development and enable live reload. The page also enables separate CSS and JavaScript files when needed.
Render template values safely
Choose escaping for the value and the output context.
Report a problem or request a feature
Give maintainers enough information to reproduce and assess the request.
Run tests and site checks
Use the project's test workflow in a dedicated development or test environment. Two CLI entry points have different scopes:
Start in the foreground or background
Choose a startup mode for the environment:
Start, stop, and restart a site
Use these commands for one named site:
Test Erlang behavior with focused examples
Keep domain logic in small functions that accept explicit inputs. Test expected results, boundary values, and meaningful error cases without starting a full site when the function does not need one.
Trace a small number of Erlang calls
Open the Development function tracing tool as the admin user. Enter a module, optionally a function, and a small limit on the number of calls.
Trace a URL through dispatch
Open the Development page's dispatch tools. Inspect the list of active rules, then trace the path that produces an unexpected result.
Trace templates rendered by a request
Open the Development page's Live dependency graph of templates tool. Start a trace for your session, then load the page or path you want to inspect.
Understand the optional development API
The Development page has an option to enable an API for recompiling and rebuilding Zotonic. The model implements actions for recompiling, flushing caches, and refreshing indexes and translations.