From 4939884f256afb27caca03c5c76fc459938c9700 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Mar 2026 15:45:32 +0000 Subject: [PATCH] Add debug logging for Undefined symbol errors in sx.js Logs env keys (non-function) when a symbol lookup fails, to help diagnose which component/context is missing the expected binding. Co-Authored-By: Claude Opus 4.6 --- shared/static/scripts/sx.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/static/scripts/sx.js b/shared/static/scripts/sx.js index f3c1bd6..d756540 100644 --- a/shared/static/scripts/sx.js +++ b/shared/static/scripts/sx.js @@ -418,6 +418,9 @@ if (name === "true") return true; if (name === "false") return false; if (name === "nil") return NIL; + // Debug: log env keys to help diagnose + var envKeys = Object.keys(env).filter(function(k) { return typeof env[k] !== "function"; }).slice(0, 20); + console.error("Undefined symbol: " + name + " | env keys (non-fn): " + envKeys.join(", ")); throw new Error("Undefined symbol: " + name); }