lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Geoff,

> I wonder if Paul Kulchenko has considered adding the ability to attach to a running process ? It would have to be a specific PC only feature though.   It Would be a fantastic feature if its possible ?

I looked at how Decoda does this, but I can tell you that this
solution is quite complex and requires deep knowledge of setting DLL
run-time hooks. The biggest drawback for me is that it is OS specific
and quite possibly Lua VM specific (as the same code doesn't seem to
work for Lua 5.2).

> My problem is that I need to debug Lua source code that has tons of calls to my own custom C API functions, of course I cant debug that source in isolation as those functions don't exist. I need to be able to debug the source as it executes in its EXE environment.  LuaStudio allows me to do that by attaching to the exe, this facility is not present in ZBS.
> I could probably achieve the same goal using ZBS if my PC exe had an Ethernet capability and could run LuaSocket. It hasn't, so I am snookered on that solution.

You should still be able to debug your application using ZBS that runs
on the same machine. If your configuration supports sockets (it
doesn't need to have ethernet capability in the sense that it doesn't
need to have any external interfaces), you should be able to debug it
by following directions here:
http://studio.zerobrane.com/doc-remote-debugging.html. I'll be happy
to assist if you run into any issues with it.

Having said that, if sockets are indeed unavailable, I've been
thinking about providing an alternative interface that may be useful
for those systems that don't provide socket support (I'm not sure if
this is your case). It should be possible to replace the socket
interface with something that mimics the same
connect/bind/send/receive API, but uses a completely different
mechanism. Possibly named pipes or something along those lines.

Paul.