Re: LuaProbe — small source-level debugger for Lua 5.1 / LuaJIT (two files, no C deps)
António Cardoso <[email protected]> Wed, 29 Apr 2026 05:56:03 -0700 (PDT)
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin, Two things regarding your question. First, keep in mind that LuaProbe is responsible for starting your Lua program. Unlike some other debuggers that can be attached midway through execution, LuaProbe must be enabled from the start. This means your software must either run in debug mode or not at all. That’s important because debugging can slow execution by a factor of two to four. If your application has time-critical sections, this may cause issues. Second, and more directly related to your question: you don’t need to insert anything into your code for this. LuaProbe supports both traditional breakpoints and log-only breakpoints. A log-only breakpoint will not halt execution; it simply updates the output when reached. You can also attach conditions to these breakpoints. For example: foo.lua:42! if user.id == target_id The ! makes it a log-only breakpoint. Without it, the breakpoint behaves like a normal stopping breakpoint. Best Regards - Antonio Cardoso A quarta-feira, 29 de abril de 2026 à(s) 14:39:09 UTC+2, Martin Eden escreveu: > On 2026-04-29 11:05, António Cardoso wrote: > > Hi. I've been debugging a fairly large Lua 5.1 codebase at work and got > > tired of sprinkling print() everywhere, so I ended up writing a proper > > debugger and just open-sourced it. > > > > https://github.com/PlugwiseBV/LuaProbe > > > > [...] > > > > MIT-licensed. Happy to answer questions or take suggestions. > > > Nice repo, > > I like it's short and complete code. And also kudos for documenting > input/output table structures. > > I have rare luxury of using my own codebase. Which has zero print's(). > When I need to debug something I just insert print() where I want, > then run program and read results. So REPL is no use for me. > > Can debugger's discovery methods can be exposed to program? > So when debugging I can insert something like "LuaProbe:PrintLocals()". > > -- Martin > -- You received this message because you are subscribed to the Google Groups "lua-l" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/lua-l/a7b668fa-35f3-4eb0-90b7-2e4d7bc8851dn%40googlegroups.com.