PITS /
01577: debug_backtrace() for Abort
Summary: debug_backtrace() for Abort
Created: 2026-11-16 21:45
Status: Closed, added for 2.7.9
Category: Feature
Assigned:
Priority: 1
Version: all
OS:
Description:
Add debug_backtrace() call in Abort() to assist in diagnosing errors, configurable.
Perhaps configuration options could be:
- off
- to PHP error log
- to web page, for example
$trace = array_map( fn($frame) => ($frame['file'] ?? '[internal]') . ':' . ($frame['line'] ?? '?') . ' => ' . ($frame['function'] ?? ''), debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) ); echo '<span style="font-family:monospace;">' . implode("<br>", $trace) . "</span>"; exit;
I added $EnableAbortBacktrace a helper pm_backtrace() which could also be called from other functions. --Petko