ZeroBrane studio
#11
(02-25-2014, 09:02 AM)paulclinger Wrote:
(02-24-2014, 10:54 PM)FakeTruth Wrote: I tried to use remote debugging in my own project but it didn't work at all. I have compiled Lua into my project (static linked), could this be the problem and should I use the dll?

Yes, this can be problematic. What happens is this: you have an internal interpreter (statically linked), but socket library is linked against lua51.dll that is included with ZBS. So when you do require"socket" (directly or indirectly through require"mobdebug"), it loads socket.dll, which loads lua51.dll and you end up with two lua engines (and one of them may be "normal" lua and another LuaJIT), which leads to a crash.

There are two ways to deal with it:

(1) statically compile luasocket into your executable that has lua interpreter. That's what some engines do, like love2d.
(2) use a "proxy" DLL that replaces lua51.dll and will simply forward calls to your "static" executable. You can see some details here (http://studio.zerobrane.com/doc-lua52-debugging.html ) described in the context of Lua52 interpreter, but the same thing applies to statically compiled lua51 interpreter as well.

I can provide a proxy DLL if you want to experiment with it. In fact, I've been thinking about including it in the build/ folder of the IDE for cases like this. You'd just need to drop it into the same folder as your executable and the debugging should work.

That's what the documentation said as well. In my case nothing crashed however so I thought something else might be going wrong. Running ZBS and the debugger had no effect at all, it simply didn't do anything for me. (Also I'm using Lua 5.2).
Reply
Thanks given by:


Messages In This Thread
ZeroBrane studio - by xoft - 02-22-2014, 11:10 PM
RE: ZeroBrane studio - by FakeTruth - 02-23-2014, 12:14 AM
RE: ZeroBrane studio - by xoft - 02-23-2014, 12:30 AM
RE: ZeroBrane studio - by paulclinger - 02-24-2014, 04:01 PM
RE: ZeroBrane studio - by xoft - 02-24-2014, 05:19 PM
RE: ZeroBrane studio - by paulclinger - 02-25-2014, 09:02 AM
RE: ZeroBrane studio - by FakeTruth - 02-25-2014, 04:39 PM
RE: ZeroBrane studio - by paulclinger - 02-26-2014, 05:54 AM
RE: ZeroBrane studio - by FakeTruth - 02-24-2014, 10:54 PM
RE: ZeroBrane studio - by xoft - 02-25-2014, 08:36 AM
RE: ZeroBrane studio - by xoft - 02-25-2014, 09:25 AM
RE: ZeroBrane studio - by paulclinger - 02-25-2014, 01:56 PM
RE: ZeroBrane studio - by FakeTruth - 02-27-2014, 04:40 AM
RE: ZeroBrane studio - by paulclinger - 02-28-2014, 08:55 AM
RE: ZeroBrane studio - by xoft - 02-28-2014, 01:08 AM
RE: ZeroBrane studio - by xoft - 02-28-2014, 06:27 AM
RE: ZeroBrane studio - by xoft - 03-01-2014, 01:29 AM
RE: ZeroBrane studio - by paulclinger - 03-01-2014, 03:58 AM
RE: ZeroBrane studio - by xoft - 03-01-2014, 11:53 AM
RE: ZeroBrane studio - by paulclinger - 03-01-2014, 04:43 PM
RE: ZeroBrane studio - by xoft - 03-01-2014, 09:45 PM
RE: ZeroBrane studio - by FakeTruth - 03-01-2014, 11:00 PM
RE: ZeroBrane studio - by xoft - 03-01-2014, 11:15 PM
RE: ZeroBrane studio - by FakeTruth - 03-02-2014, 12:17 AM
RE: ZeroBrane studio - by paulclinger - 03-02-2014, 04:24 AM
RE: ZeroBrane studio - by paulclinger - 03-03-2014, 10:43 AM
RE: ZeroBrane studio - by xoft - 03-04-2014, 06:44 PM
RE: ZeroBrane studio - by paulclinger - 03-05-2014, 03:07 AM
RE: ZeroBrane studio - by xoft - 03-05-2014, 03:37 AM
RE: ZeroBrane studio - by xoft - 03-17-2014, 06:17 AM
RE: ZeroBrane studio - by paulclinger - 03-17-2014, 01:09 PM
RE: ZeroBrane studio - by xoft - 03-17-2014, 07:20 PM
RE: ZeroBrane studio - by xoft - 03-20-2014, 07:47 AM
RE: ZeroBrane studio - by xoft - 04-01-2014, 02:14 AM
RE: ZeroBrane studio - by bearbin - 04-01-2014, 05:04 AM
RE: ZeroBrane studio - by NiLSPACE - 04-12-2015, 03:33 AM
RE: ZeroBrane studio - by xoft - 04-12-2015, 03:48 AM
RE: ZeroBrane studio - by NiLSPACE - 04-12-2015, 03:51 AM
RE: ZeroBrane studio - by xoft - 07-25-2015, 04:09 PM



Users browsing this thread: 8 Guest(s)