Move debugger functions exported to Lua into their own file