Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion debugger.lua integration? #11

Open
slembcke opened this issue Feb 28, 2019 · 0 comments
Open

Feature suggestion debugger.lua integration? #11

slembcke opened this issue Feb 28, 2019 · 0 comments
Labels

Comments

@slembcke
Copy link

slembcke commented Feb 28, 2019

I've been puttering around with making a bunch of scripts to help automate making graphics for my NES games, which has been working out really well. The biggest issue I've run into is that debugging the scripts is really tedious without a debugger, and lua's minimal amount of built in "to string" capabilities makes log based debugging tedious too.

So... a shameless plug for a project I've been working on for a few years:
https://github.com/slembcke/debugger.lua

Why you might want to consider integrating it:

  • Can be included as a single .lua file or .c file (that embeds the lua source and provides a C API).
  • Minimal bloat. The debugger is < 20kb of pure Lua code, no external dependencies.
  • Provides dbg.call()/dbg_call() to provide a drop in replacements for pcall()/lua_pcall() that attach the debugger on an error.
  • Retargetable I/O (see more below)
  • Zero overhead when the REPL is not active.
  • Simple but effective debugger with step/next/continue, variables listing, statement/expression evaluation, backtrace, code inspection, and more.
  • Could be used like a REPL to experiment with the Asesprite API more easily.

I had tried using it before, but the lack of require(), and io.read() seemed to make it a non-starter. Since debugger.lua has retargetable I/O by overriding it's read() and write() functions, it occurred to me today that I could just use UNIX FIFOs to connect the I/O to a terminal. Voila! So apparently the I/O issue is the only thing holding it back.
debugger

I'll probably try integrating it myself, but I dunno how far I'll be able to get...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants