löve-debugger: Seamless integration for debugger.lua

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
Posts: 1
Joined: Sun Mar 03, 2019 3:24 pm

löve-debugger: Seamless integration for debugger.lua

Post by slembcke » Sun Mar 03, 2019 4:54 pm

Hey all. So I maintain a really lightweight, embeddable, interactive debugger for Lua called debugger.lua. I like it because it's just a single Lua or C file I need to drop into a project to have a working debugger where I can list variables, evaluate expressions, step through code, etc.

I hadn't used Löve for a few years, so I thought it might be fun to see how it's changed. debugger.lua "just worked" with Löve, but you have to run it from the terminal. Of course, instead of making a game I made an integrated console for it instead... :rofl:


Pretty easy to integrate into a project. Just drop debugger.lua, love-debugger.lua, and VeroMono.ttf into your project and call dbg = require 'love-debugger' somewhere in main.lua. Whenever you call dbg() or an error occurs it will automatically show the debugger console.

It also sort of gives you an offscreen console to log to. Calling dbg.writeln() will let you log things, and you can set up a key to trigger a breakpoint and show the console.

Grab the code from GitHub if interested:

Suggestions and feedback welcome!

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests