Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why can't you just put the equivalent of `(repl)` wherever you want to debug and drop into your REPL?


Short answer: I don’t know. That sounds like a good idea, but how would that access local variables in the caller (to inspect state)?

I remember the Lua C API exposes a lot of information, but I didn’t think it was accessible from scripts. Of course, it was a long time ago and I could have easily missed something at the time. Happy to be corrected!

Edit: you might also run into difficulties trying to redefine non-global functions to add the call to “repl”.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: