|
Hello Paul
Thanks for the reply. I guessed it was likely to be a tricky thing to do and being OS specific is a pain. Yes, for my specific case I don't have the opportunity to use Sockets so that's why attaching to the exe was an ideal solution for me. Its very convenient as it works well, without me needing to change the exe file in any way. Maybe an alternative approach might be possible as you mentioned, adding a few line of code that interfaced ZBS to the exe via a pipe. Coincidentally, my app is already using an anonymous pipe to pass data back and forth between a GUI exe. I hope the feedback was interesting, at least you know its a feature that some ZBS users would find very useful. Regards Geoff > Date: Tue, 11 Jun 2013 21:26:28 -0700 > From: paulclinger@yahoo.com > To: lua-l@lists.lua.org > Subject: Re: Anyone using Decoda IDE? > > 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. > |