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 16:48:39 +0200
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
Thanks for changes!

-- Martin

On 2026-04-29 16:17, António Cardoso wrote:
> Hi Martin,
>
> Added now a way to do what you want (more or less). This repo will never
> allow you to add something like LuaProbe:PrintState because one of the
> reasons for its creation was to avoid injecting code in the codebase.
> Instead you can run like this 2 examples, where by setting up as log-only
> breakpoints by adding the ! simbol to the expression.
>
> bin/luaprobe -b 'examples/demo.lua:7![locals,stack] if i == 2' examples/demo.lua
>
> luaprobe: launching: lua5.1 examples/demo.lua
> luaprobe:   breakpoint: examples/demo.lua:7![locals,stack] if i == 2
> luaprobe: waiting for events (Ctrl-C to quit)
> hello, world (1)
> hello, world (2)
> hello, world (3)
> luaprobe: child attached
>
> [LOG] examples/demo.lua:7  [main]
>   #1  greet                    examples/demo.lua:7
>   #2  <main>                   examples/demo.lua:11
>   #3  [C]                      =[C]:-1
>   locals:
>     name = "world"
>     times = 3
>     message = "hello, world"
>     i = 2
>
>
> and here it is without any condition and just removing the stack
>
> bin/luaprobe -b 'examples/demo.lua:7![-stack]' examples/demo.lua
> luaprobe: launching: lua5.1 examples/demo.lua
> luaprobe:   breakpoint: examples/demo.lua:7![-stack]
> luaprobe: waiting for events (Ctrl-C to quit)
> hello, world (1)
> hello, world (2)
> hello, world (3)
> luaprobe: child attached
>
> [LOG] examples/demo.lua:7  [main]
>   #1  greet                    examples/demo.lua:7
>   locals:
>     name = "world"
>     times = 3
>     message = "hello, world"
>     i = 1
>
> [LOG] examples/demo.lua:7  [main]
>   #1  greet                    examples/demo.lua:7
>   locals:
>     name = "world"
>     times = 3
>     message = "hello, world"
>     i = 2
>
> [LOG] examples/demo.lua:7  [main]
>   #1  greet                    examples/demo.lua:7
>   locals:
>     name = "world"
>     times = 3
>     message = "hello, world"
>     i = 3
>
> You can of course then setup your own GUI or custom interface for whatever
> editor you choose, we will be also publishing in a near future a proper TUI
> using lua-curses and an emacs extension. bin/luaprobe is already a small
> CLI for it but a very mininal one and it might get in the way
>
> -Antonio Cardoso
>

-- 
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/e65851a8-45ff-454a-aef0-97db8510e2af%40disroot.org.