Connect to the running Erlang shell

From the checkout root:

bin/zotonic shell

This attaches to the live node. Expressions run against that node's actual code and data, so start with read-only inspection.

C = z:c(garden).
z_context:site(C).

Expect the site name garden. A fresh site context is not automatically an administrator context. Use an authenticated request context or deliberate, local-only elevation when testing mutations.

Leave the remote shell with Ctrl-C twice. Do not call q(). or halt(). to detach: they can stop the shared node.

If connection fails, check the target node name, Erlang distribution setup, and cookie configuration. See Work with a site context and Inspect content from the Erlang shell.

Inspect content from the Erlang shell

With C = z:c(garden) in an attached shell:

Id = m_rsc:rid(<<"page_home">>, C).
m_rsc:p(Id, title, C).
m_edge:objects(Id, haspart, C).

The named resource must exist on that site; undefined can mean the chosen name is absent. Use the generated site's real resource names rather than assuming every skeleton creates identical content.

Inspect individual properties first instead of dumping an entire resource containing private fields. Use models for normal content access, and understand the ACL context before interpreting missing results.

For a portable representation, inspect model#rsc_export. For changes, use model#rsc and model#edge, then check the public result separately. See Use stable resource names.