development

Model for development and diagnostics controls, including tracing flags, observer lists, cache/compile/reindex actions, and dispatch info.

Available Model API Paths

MethodPath patternDescription
get/is_dbtrace/...Return whether database query tracing is currently enabled.
get/+cfg/...Resolve the configuration flag +cfg and return the matching value via m_config:get_boolean.
get/function_tracing_enabled/...Return whether function tracing controls are enabled for current user/session.
get/list_observers/...Return registered notifier observers for inspection (admin/development access required).
get/record_info/+record/...Return runtime record-field metadata for record name +record.
get/recompile/...Return config flag controlling whether runtime recompile action is enabled.
get/flush/...Return config flag controlling whether cache flush action is enabled.
get/reindex/...Return config flag controlling whether reindex action is enabled.
get/dispatch_info/...Return dispatch rule info/inspection data for development diagnostics.
get/editorDetect editors on development sites; requires use of mod_development. Other environments use browser launches without local probes.
get/can_open_directoryWhether an administrator on a development site can open installation directories on the server desktop. Requires mod_development access, a desktop opener, and no container/browser-only restriction.
get/config_source/+fileReturn a signed editor location for an existing Erlang init, Zotonic, or current-site config file. Administrator and development-site access required. Other paths are rejected.
post/editor/preferenceSave the machine editor choice; development environment and module ACL required; disabled in containers.
post/editor/openOpen an indexed template or signed source/config location; development environment and module ACL required; disabled in containers. Config locations additionally require administrator access and must still be listed among the node’s Erlang init, Zotonic, or current-site config files.
get/show_trace_button/...Check if the trace button for debugging templates can be shown.
get/template_trace_parents/...Return traced parent relations for a template source location.
get/template_trace_children/...Return traced templates included from a template source location.
get/template_trace_filename_menu/...Return grouped filename-menu relations for a traced template.

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

The System Information directory buttons call open_directory/2 through a signed postback. It requires administrator and development-module access on a site whose environment is development. Only the installation keys files_dir, data_dir, log_dir, config_dir, security_dir, work_dir, home, and root are accepted; paths are resolved on the server. The local desktop opens the directory, not the browser's computer. Containers and development_editor_browser_only disable launches. macOS uses open, Linux desktop sessions use xdg-open, and Windows uses explorer.exe, with arguments passed directly to the executable.

Edit on GitHub