Replies: 1 comment
-
Ok, using lua_getargument, lua_getlocal, lua_getupvalue should help me print variables and get/set them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ! I have been trying to implement a basic debugger using the debugging api. I compile my example script with maximum debug level and no optimization, execute the script then set a break point in a function defined by my script. I managed to set and trigger breakpoints, however I don't understand the purpose of LUA_BREAK, whenever a break point is triggered lua_pcall returns LUA_OK instead.
I already tried to call lua_break inside my breakpoint hook but then a runtime error is thrown (lua_pcall returns LUA_ERRRUN), same when I call lua_yield. Do I have to create a thread explicitly using lua_createthread to have it return LUA_BREAK ?
Finally how to resume execution if lua_pcall returns LUA_BREAK ? This would be the next step and I am also lost here.
Lastly, does sandboxing with lua_sandbox prevent any debugging related function(s) from working ? There are no way to un-sandbox, so this seems important.
Beta Was this translation helpful? Give feedback.
All reactions