![]() |
Built-in Crash Analysis |
If your program encounters a fatal exception, Sheerpower automatically writes a crash file in the same folder as the program. The filename is <source>_error_<timestamp>.txt.
Each crash report contains:
Example output:
This built-in crash report helps you quickly pinpoint fatal issues in your Sheerpower program.
SHOW ALL
The SHOW ALL
statement generates a full debug report
while the program is still running. It creates a file named
<source>_debug_<timestamp>.txt
.
This is useful for tricky bugs, test snapshots, or state checkpoints:
SHOW ALL
captures program state with high precision—
without halting execution.
You can also trigger a debug report from outside the program using its Process ID (PID). Useful if the program is frozen or looping.
This saves a full snapshot to
<source>_show_all_<timestamp>.txt
,
with the same diagnostics as SHOW ALL
.
tasklist /fi "imagename eq sp4gl.exe"
External dumps include the same data as crash or internal dumps, making them great for diagnosing live systems.
If you must terminate early, use abort
to exit and
optionally return an error code.
The OS receives exit code 5, which can be used by scripts or automated checks.
Sheerpower keeps final values of local and parameter variables even after a routine finishes. Traditional debuggers discard them.
This is done via name munging, where variables are renamed by routine:
This preserves historical context and avoids name conflicts—perfect for debugging multi-step business logic.
Business applications often process confidential information— such as passwords, API tokens, or personal identifiers—that must not appear in crash dumps or debug logs.
Use the nodump
declaration modifier to keep
sensitive values out of all diagnostic output. Variables marked
nodump
are excluded from automatic crash files,
SHOW ALL
listings, and external PID-based dump triggers.
Within clusters, you can mix nodump
and
dump
on a field-by-field basis.
Cluster Example:
Simple Example:
In debug output, these variables appear as:
nodump
nodump
attribute keeps sensitive data hidden while
preserving full visibility into all other program state during debugging.
invoice_error_2025-08-04_2200.txt
— crashinvoice_debug_2025-08-04_2215.txt
— SHOW ALLinvoice_show_all_2025-08-04_2220.txt
— externalSheerpower automatically generates a detailed crash file when fatal errors occur. It captures source location, call stack, variable state, open resources, and routine context.
Debugging is simplified through crash dumps, internal
SHOW ALL
, or external triggers using sp4gl
debug
.
Final values of local and parameter variables are retained across completed routines—providing deep insight for diagnosing bugs in complex workflows.
This rich diagnostic support makes Sheerpower especially strong for building reliable business applications.
SHOW ALL
creates <source>_debug_<timestamp>.txt—without haltingabort N
for immediate exit with codenodump
declaration modifier excludes a variable from all debugging file output.
Hide Description
|
|
Enter or modify the code below, and then click on RUN |
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |