[ZeroBrane Studio] Re: Integrating other "runtimes"

  • From: Ignacio Burgueño <iburgueno@xxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Tue, 9 Apr 2013 18:49:11 -0300

Ok, what an embarrassment. I hit send too soon.

Let's try again.

I'd like to use ZeroBrane to debug some scripts that needs LuaNode [1] to
run. LuaNode is, basically, a node.js clone.
I added a new interpreter file under the "interpreters" folder, but I could
not get it to work properly. I managed to get a debugger server running and
then I start another process that connects back to the server, using the
following script:

------------------------
local mainpath = "d:/zerobranestudio/"

package.cpath = mainpath.."bin/?.dll;"..mainpath.."bin/clibs/?.dll"
package.path = mainpath .. "/lualibs/?/?.lua;" ..
mainpath.."/lualibs/?.lua;" .. package.path

--package.path =
"d:/zerobranestudio/bin/clibs/?/?.lua;d:/zerobranestudio/lualibs/?.lua;" ..
package.path

package.path =
[[C:\LuaRocks\1.0\lua\?.lua;C:\LuaRocks\1.0\lua\?\init.lua;]] ..
package.path

xpcall(function()
io.stdout:setvbuf('no')
require('mobdebug').loop('BURGUERTOP',8172)
process:loop()
end,
function(err) print(debug.traceback(err)) end)
------------------------

I can then step through the script I have opened in ZeroBrane, but it won't
stop in breakpoints placed in callbacks. For example:

1: setInterval(function()
2: console.log("%s", os.time())
3: end, 2000)
4: process:loop()

I can put a breakpoint at line 1, but a breakpoint in line 2 is never hit.

Does any of the other runtimes behave similarly (use of an event loop, etc)
so I can take a look?

Thanks in advance,
Ignacio

​

Other related posts: