Ex16 — Debugging and error tracing
Use browser DevTools Console, page footer errors, edit-mode HTML markers, and cache/Sphp_errorLog.txt.
Status
comp.php debugMode: 2 — 0=off, 1=errors, 2=warnings, 3=verboseblnEditMode: OFF (session edtmode: empty)getCheckErr(): false- This Gate file:
/spanel/public_html/apps/examples/Ex16debug.gate.php
1. Session edit mode (live-safe)
Only your browser session sees Front/Master source markers after you pass the token once. Other visitors stay blind.
Enable edit mode (?edtmode=abc) Reload without token
With edit ON, inspect HTML: meta for Master; Front wrappers; tags get data-sedt (front name), data-sedtl (line), data-sedtt (char). Dynamic HTML has none of these.
2. Soft / logical errors (do not stop PHP)
User errors also appear below via Master traceError; developer inner via Master traceErrorInner (debugMode).
3. App coding notice (ignore framework frames)
Opens apps/examples/ex16_buggy_helper.php — when reading a stack/log, skip vendor/sartajphp/ and fix the first apps/, fronts/, or masters/ file.
4. Hard exception (error page / log)
May show the framework error page. Still: find the Ex16debug.gate.php frame, not ionCube/vendor internals.
Console: Gate / event / front paths when debugMode is greater than 0.
Custom lines: Gate debug->println.
Critical crash: cache/Sphp_errorLog.txt.