LuaSimple remote implementationDebuggerIs the content to be introduced in this article, mainly to understandLUAInDebuggerFor more information, see the implementation of the specific content.
Finally, let's put a picture first.
The Ldb function is still relatively simple. Currently, there are only one step: step into, step over, step out and breakpoint. The other is Local Var and Call Stack. Add Watch quickly.
The local code is still debugged. Although it is a remote mechanism, to solve the problem of debugging remote scripts, when there is no code in the Local Machine, a policy is required to transfer the code from the debug end.
In addition, efficiency issues:
1. After the debugger is started, the host program starts two additional threads, one Listen, one send and one recv. Although IOCP is used for most of the time, both threads are Sleep, but...
2. The lua client hook is too high, which also affects the execution efficiency. At this time, the debugger is not a big problem.
Summary:LuaSimple remote implementationDebuggerI hope this article will help you!