aboutsummaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 7cba5e3a9..8ce427a5d 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -305,6 +305,25 @@ end
This makes it possible to apply these functions on strings using
colon syntax (`mystring:uc_upper()`).
+# Debugging Lua filters
+
+It is possible to use a debugging interface to halt execution and step through a
+Lua filter line by line as it is run inside Pandoc. This is accomplished using
+the remote-debugging interface of the package
+[`mobdebug`](https://github.com/pkulchenko/MobDebug). Although mobdebug can be
+run from the terminal, it is more useful run within the donation-ware Lua editor
+and IDE, [Zerobrane](https://studio.zerobrane.com/). Zerobrane offers a REPL
+console and UI to step-through and view all variables and state.
+
+If you already have Lua 5.3 installed, you can add
+[`mobdebug`](https://luarocks.org/modules/paulclinger/mobdebug) and its
+dependency [`luasocket`](https://luarocks.org/modules/luasocket/luasocket) using
+[`luarocks`](https://luarocks.org), which should then be available on the path.
+Zerobrane also includes both of these in its package, so if you don't want to
+install Lua seperately, you should add/modify your `LUA_PATH` and `LUA_CPATH` to
+include the correct locations; [see detailed instructions
+here](https://studio.zerobrane.com/doc-remote-debugging).
+
# Examples
The following filters are presented as examples. A repository of