diff options
author | Norbert Preining <norbert@preining.info> | 2022-10-05 03:01:34 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-10-05 03:01:34 +0000 |
commit | 6925a15396a955498e1d1663204e7fa7da3d1728 (patch) | |
tree | 925ce3e30472ef82315230ec2772e2e104642541 /macros/luatex/generic/lualibs/lualibs-util-deb.lua | |
parent | 30b3429f0e138c93c5f1ba1d1a6d46728c0943e9 (diff) |
CTAN sync 202210050301
Diffstat (limited to 'macros/luatex/generic/lualibs/lualibs-util-deb.lua')
-rw-r--r-- | macros/luatex/generic/lualibs/lualibs-util-deb.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macros/luatex/generic/lualibs/lualibs-util-deb.lua b/macros/luatex/generic/lualibs/lualibs-util-deb.lua index bd94b6d01e..10e5731b03 100644 --- a/macros/luatex/generic/lualibs/lualibs-util-deb.lua +++ b/macros/luatex/generic/lualibs/lualibs-util-deb.lua @@ -346,3 +346,25 @@ debugger.showtraceback = showtraceback -- debug.showtraceback = showtraceback -- showtraceback() + +-- For now also here because we want it in mtxrun (taken from lmt file): + +if luac then + + local show, dump = luac.print, string.dump + + function luac.inspect(v) + if type(v) == "function" then + local ok, str = xpcall(dump,function() end,v) + if ok then + v = str + end + end + if type(v) == "string" then + show(v,true) + else + print(v) + end + end + +end |