Skip to Content
Lua Quick Start Guide
book

Lua Quick Start Guide

by Gabor Szauer
July 2018
Beginner
202 pages
5h 42m
English
Packt Publishing
Content preview from Lua Quick Start Guide

Debugger.lua

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: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Lua Programming

Beginning Lua Programming

Kurt Jung, Aaron Brown
Vim Masterclass

Vim Masterclass

Jason Cannon

Publisher Resources

ISBN: 9781789343229Supplemental Content