Debugging advanced FileMaker script issues
ExpertUse the Script Debugger, Data Viewer, logging, and systematic isolation to diagnose complex FileMaker script bugs that only occur in production.
What you'll learn
- How to use the Script Debugger and Data Viewer for step-by-step debugging
- How to add temporary logging to reproduce a production-only bug
- How to narrow down a bug with binary search (commenting out half the script)
- How to reproduce privilege-related bugs by switching to the affected privilege set
- How to use Get(LastError) defensively throughout a script to surface hidden failures
Some bugs only appear in production -- against real data volumes, real user privilege sets, over real network connections, with real concurrent users. The Script Debugger, which requires development-mode access, cannot be used on live production files. This lesson covers the remote-debugging toolkit: strategic logging, binary-search isolation, and privilege-set narrowing to reproduce and fix bugs that refuse to appear in development.
Use the Script Debugger and Data Viewer
The Script Debugger (Tools > Script Debugger) pauses execution at each step and shows the current script, step position, and result. Combined with the Data Viewer (Tools > Data Viewer), which shows live variable and field values, you can trace any bug that is reproducible in development. Set breakpoints on the specific step you suspect, then observe the state before and after it runs.
# Script Debugger usage tips: # - Set a breakpoint on the suspect step by clicking the dot to its left # - Use "Step Into" (F5) to enter sub-scripts; "Step Over" (F6) to skip them # - Use "Set Next Step" to re-run a step without restarting the script # - The Call Stack panel shows which scripts are in the call chain # Data Viewer tips: # - Add watch expressions for key variables and fields # - Use expressions like JSONGetElement($result; "error") to inspect nested values # - Boolean expressions (e.g. Get(LastError) != 0) show True/False in real time
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo