July 2018
Beginner
202 pages
5h 42m
English
Before moving on, let's take a look at an external debugger solution, one not built into Lua. dbeugger.lua is one such solution; it is a debugger written in Lua. You should grab a copy of the debugger.lua file from https://github.com/slembcke/debugger.lua.
To use debugger.lua, you first have to include the module in your source file. This is just a standard call to require, for example:
local debug = require("debugger")
The module that was just included is a functable. That is, it can be called as a function. To set a breakpoint, at any point in your code, just write debug(). Whenever one of these debug() commands is hit, the flow of execution will be given to the debugger. You can use the following console commands to debug: ...