On Fri, Dec 05, 2014 at 10:22:50PM +0100, Peter Bowers wrote: > On Thu, Dec 4, 2014 at 9:55 AM, Hans Bracker <des...@softflow.co.uk> wrote: > What if pmwiki was distributed with 2 copies of pmwiki.php -- one the > standard production version and the other pmwiki-debug.php. In the case of > a need for troubleshooting an admin would swap out the pmwiki.php with the > pmwiki-debug.php (simply renaming appropriately) and then re-load the > page. The pmwiki-debug.php version could do various things to help debug:
>From a maintainer's point of view, this is a real pain, because you have to do extra work to keep the two copies in sync. The standard way to do this in programming is using a flag variable. > creating an array indexed by regex/replace strings and holding a > "Scriptname.php: lineno" string. Then when Petko's error is triggered it > could include the script name and line # I still think it's better to report things when the markup rule is registered (i.e., inside the call to Markup()), rather than when the rule is executed. And the existence of debug_backtrace ought to mean that PmWiki doesn't need to do any special tracing of its own. Pm _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users