%D \module
%D   [       file=trac-deb,
%D        version=2005.11.06,
%D          title=\CONTEXT\ Tracing Macros,
%D       subtitle=Debugger,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\writestatus{loading}{ConTeXt Tracing Macros / Debugger}

%registerctxluafile{trac-lmx}{1.001}
\registerctxluafile{trac-deb}{1.001}

\unexpanded\def\breakpoint{\showdebuginfo\wait}

\unexpanded\def\showtrackers          {\ctxlua{trackers.show()}}
\unexpanded\def\enabletrackers    [#1]{\ctxlua{trackers.enable("#1")}}
\unexpanded\def\disabletrackers   [#1]{\ctxlua{trackers.disable("#1")}}
\unexpanded\def\resettrackers         {\ctxlua{trackers.reset()}}

\unexpanded\def\showdirectives        {\ctxlua{directives.show()}}
\unexpanded\def\enabledirectives  [#1]{\ctxlua{directives.enable("#1")}}
\unexpanded\def\disabledirectives [#1]{\ctxlua{directives.disable("#1")}}

\unexpanded\def\showexperiments       {\ctxlua{experiments.show()}}
\unexpanded\def\enableexperiments [#1]{\ctxlua{experiments.enable("#1")}}
\unexpanded\def\disableexperiments[#1]{\ctxlua{experiments.disable("#1")}}

\unexpanded\def\showdebuginfo         {\ctxlua{lmx.showdebuginfo()}}
\unexpanded\def\overloaderror         {\ctxlua{lmx.overloaderror()}} % \enabledirectives[system.showerror]

\unexpanded\def\showlogcategories     {\ctxlua{logs.show()}}
