lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

i guess he's asking for some way to modify the source while the script
is 'paused', and continue after that with the new code, preserving all state.

at first sight, you could simply repeat the dofile with the existing lua
state; but what if the code is paused deep within several function calls?

Fix-and-continue generally means that when you change a function, any new invocation sees the new code, while active invocations continue using the old code.  That's what happens when you redefine functions in Lua, no matter how deep you are inside the call stack.

Changing functions that are currently executing is not a well-defined operation in general (e.g., what happens if you delete the call to g() in its parent while g() is executing?).  Code insertion is well-defined, but generally considered a "debugger interface", not a "fix and continue" interface.