[ZeroBrane Studio] Re: Getting basics working

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Thu, 18 Sep 2014 17:00:49 -0700

> The system Lua here which is binary incompatible is completely reliable. 
> Using it seems to need remote debug via TCP/IP.

If you can load luasocket or provide your own interface that mimics
the API luasocket provides, you should be fine.

> Adding this to a script
> require('mobdebug').start
> Producing Compilation error on line 2:

You should be using "require('mobdebug').start()" if you are running
on the same machine and
"require('mobdebug').start('ip.address.of.computer-with-ZBS')" if you
are running on a different one. There shouldn't be any compilation
errors.

> And "The instruction at 0x66d8171d referenced memory at 0x00000061. The 
> memory could not be read."

I'm not sure what may be causing this in your case, but it could be
related to the incorrect ".start" reference (as it should be a
function call).

If you still get an error when you change it to a function call, try
to replace it with something simpler, for example, "require'socket'"
to see if it works. If it does, try to then open that socket to
connect to localhost:8172. I expect mobdebug to work if you can get
luasocket connection to work in your environment.

Paul.

Other related posts: