You should be able to debug your application using ZeroBrane Studio , following the instructions for debugging Lua 5.2 . Note that you will need to build luasocket against Lua5.2. (The probability of failure is probably due to the fact that your application loads luasocket, which is compiled against Lua5.1, which, in turn, loads the Lua5.1 DLL or does not find the required characters.)
If you do not want to compile luasocket, you can get binaries for Windows / OSX / Linux from this folder and its subfolders ; just make sure these libraries are in LUA_CPATH in front of any folders that may have luasocket compiled with Lua5.1.
[Updated based on chat discussion] The reason you might get a few problems with VM is because your application is probably statically compiling a Lua interpreter. Then you download luasocket (directly or via mobdebug), which is compiled against lua52.dll, which loads another copy of the interpreter. To avoid this, you have two options: (1) compile luasocket into your application in the same way as the lua interpreter itself; you will not need anything but one mobdebug.lua file to debug your application, or (2) use a dll proxy; it will look like lua52.dll, but actually proxies your calls to your statically compiled lua library, avoiding problems with multiple virtual machines. dll proxy for Lua 5.1, but you can configure the script to work for Lua 5.2.
(If your interpreter is not statically compiled, you can still get two interpreters if the LLLL library you load is called differently from lua52.dll.)
source share