This is not a concrete answer to the question, but I'd like to write a generic answer anyway.
attempt to index a boolean value (global 'debug')
is a Lua error message which tells you that you are attempting to use a member of a Lua table, but what you treat as a table is not a table (anymore).
In my case I tried to call the function
getinfo() from the table
debug (which is built into Lua and should be available anywhere), but when invoking it Lua found a boolean value (
It is very likely that this observation indicates that the builtin table
debug has at some point been overwritten with a boolean, either in your preamble or - as a bug - in a package.
To find the culprit it is useful to insert
in your preamble as suggested in this comment. The first line will print the table address - as long as there still is a table - the second line will cause an error and stop the compilation. You can iterate through every step of your preamble to find exactly where the problem starts.
The reason for this issue is a typical Lua programming error, in this case in a package. In order to create a status flag the package contained the line
debug = false
debug variable to
false as its default value, which is then used in a function outputting debug information.
The problem is that in Lua variables are by default in the global namespace (opposite behaviour from e.g. Python) - which means that the line above overwrites the global variable and effectively "kills" the whole builtin Lua table.
This is a very good example for the advice never to forget using local variables in Lua wherever possible:
local debug = false
debug is local to the current module and does not affect the global table with the same name.