blob: b004cdeb4956750a89f5e5f381dbc080a376ebf4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
%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]
%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-deb}{1.001}
\def\showdebuginfo{\ctxlua{tracers.showdebuginfo()}}
\def\overloaderror{\ctxlua{tracers.overloaderror()}}
\def\breakpoint{\showdebuginfo\wait}
\appendtoks
\ctxlua {
if debugger.tracing() then
debugger.enable() ;
end
}%
\to \everyjob
\appendtoks
\ctxlua {
if debugger.tracing() then
debugger.disable() ;
debugger.savestats("\jobname-luacalls.log") ;
end
}%
\to \everybye
\def\showtrackers {\ctxlua{trackers.show()}}
\def\enabletrackers [#1]{\ctxlua{trackers.enable("#1")}}
\def\disabletrackers [#1]{\ctxlua{trackers.disable("#1")}}
\def\resettrackers {\ctxlua{trackers.reset()}}
\def\showdirectives {\ctxlua{directives.show()}}
\def\enabledirectives [#1]{\ctxlua{directives.enable("#1")}}
\def\disabledirectives [#1]{\ctxlua{directives.disable("#1")}}
\def\showexperiments {\ctxlua{experiments.show()}}
\def\enableexperiments [#1]{\ctxlua{experiments.enable("#1")}}
\def\disableexperiments[#1]{\ctxlua{experiments.disable("#1")}}
|