Re: LuaProbe — small source-level debugger for Lua 5.1 / LuaJIT (two files, no C deps)

"'Martin Eden' via lua-l" <[email protected]> Wed, 29 Apr 2026 15:24:01 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
On 2026-04-29 14:56, António Cardoso wrote:
> 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

Hi Antonio,

Its okay, that debugger will load program, not vice versa.

What will be useful for my case is non-interactive debugger.

So I won't spend calories on smashing keys in debugger's shell.
Instead in code I'll add something like

   local some_very_tricky_condition
   -- [...]
   if some_very_tricky_condition then
     LuaProbe:PrintState(
       {
         Locals = true,
         Stacktrace = false,
         Upvalues = false,
       }
     )
   end

-- 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/f1d15b60-fea7-46dd-ac03-eb3bb600ce9b%40disroot.org.