In the Shopify Partners dashboard navigate to your app, open the Functions section, and select the Function; the Logs tab streams recent invocations with input, output, and any runtime errors
Use `shopify app logs` CLI command if you prefer terminal output; it tails live Function execution events for your development store
For structured debugging add console.error or console.log calls inside the Function run entrypoint; these appear in the logs panel as stdout/stderr entries alongside the invocation record
Examine the logs for input query errors (complexity exceeded, missing fields) vs logic errors (wrong output shape, type mismatches) — they surface differently in the log entry
If the Function returns an empty result (no discounts applied) without an error, add a log statement at each conditional branch to identify which path was taken; then replay with a known input using `shopify app function run`
Check the Function's execution time in the log; Functions have a strict time budget (check current docs for the limit) — exceeding it causes a timeout failure visible in the logs
Known gotchas
Function logs in Partners dashboard have a short retention window; set up an external log drain or periodically export logs if you need historical data for debugging
console.log output from a Function is visible in dev store logs but may be sampled or rate-limited in high-traffic production stores — do not rely on logs for every invocation
The input logged for an invocation is the actual input the Function received, not what your input.graphql requests — if a field is missing from the input at runtime, re-check your TOML metafield declarations and input.graphql field selection
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp