Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
zerobrane with a remote player? — Gideros Forum

zerobrane with a remote player?

katieajnkatieajn Member
edited February 2013 in General questions
Hi

I don't know if im being really daft or not but does anyone know if it's possible using zerobrane to get it talking to a remote player on the device. I cant find anywhere to put the IP address like in Gideros Studio. If this is not possible then I think I might need to start with Studio rather then the zerobrane IDE.

Thanks

Katie

Comments

  • bowerandybowerandy Guru
    edited March 2013
    @katleajn, I've been talking with PaulK (the author of ZBS) about this and there is a new version of ZBS that allows you to do this. You may need to take the latest version from the GitHub repo as the changes required are fairly recent.

    https://github.com/pkulchenko/ZeroBraneStudio

    1) Once you have this installed you need to tell ZBS the IP address of your real device. I've only tried this with iOS but it may well work with Android too. In the ZBS console type:

    ide.config.gideros = {remote ="192.168.1.XXX"}

    2) Next you need to add the following lines into your app being debugged. This time you need to specify the IP address of the desktop computer where ZBS is running:

    require("mobdebug").start("192.168.1.YYY")

    You'll need to have added mobdebug.lua and socket.lua to your project (in Gideros Studio) but I assume you have already done this.

    3) CLOSE GIDEROS STUDIO. ZBS cannot connect while it is open.

    4) Load your project in ZBS and hit run. It should report: "Configuring remote player at 192.168.1.XXX" and should then break on the mob debug.start line in your code.

    I hope this gets you going.

    best regards
  • MellsMells Guru
    edited October 2013
    @PaulClinger
    Sorry about that but... where do you find mobdebug? (this one?)
    and socket.lua?

    I chose to copy it to my project because to be honest I didn't understand well what to do with (1) and (2) :
    (1) Set LUA_PATH and LUA_CPATH before starting your application (see Setup environment for debugging); (2) Reference path to mobdebug.lua and luasocket using package.path and package.cpath (see Configure path for debugging);
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • @Mells, you can find Mobdebug in /lualibs/mobdebug/mobdebug.lua. It always ships with ZBS, but you can also grab one from Mobdebug repository. The reason why it may be better to use one from ZBS is that you may be using some older version of ZBS and mobdebug that ships with it is guaranteed to work with that version.

    Yes, you will need to copy it to your project if you want to do on-device debugging. You can ignore those LUA_PATH and LUA_CPATH references as they are for the case when you don't want to copy mobdebug and prefer to reference those that ships with ZBS. This is not possible when you do remote debugging from a different computer (or other device) as it is in your case, so you just need to include mobdebug.lua. You don't need to include socket.lua as it should already be included with Gideros (as part of luasocket).
  • MellsMells Guru
    edited October 2013
    @paulclinger thanks for the support.
    You don't need to include socket.lua"
    I thought I had to add it because that's what appears on Andy's video.

    But if I uncomment the following line :
    local socket = require "socket"
    I get errors because "socket" appears several times in the file.

    What am I doing wrong?
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • @Mells, I'd trust @bowerandy's video on that ;). I thought you don't need to include it, but I may be wrong. @atilim, I thought I don't need to explicitly include socket.lua to use luasocket on the device. Can you clarify?
  • Including library to apk or xcode project does not make it available in lua, you still need to include it in Gideros project, if thats what you are asking :)
  • MellsMells Guru
    edited October 2013
    @paulclinger, @ar2rsawseen
    thanks.
    I think it should be explained somewhere in plain english for beginners (or non initiated like me :) ) that :
    - to access mobdebug.lua the user needs to Right click on Zerobrane in "Applications" and "Show packages". Although I know it sounds obvious for people "who know" :)
    - to include luaSocket in Gideros project... went to tools, didn't find infos... searched the forum and found informations from 2012... It must be somewhere in the docs but all I found were forum posts or AppCodingEasy? Can you point me in the direction of the official docs on that topic please?
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • isn't AppCodingEasy official enough docs? :-/

    kidding, kidding
    I have almost completed docs management software (previously they were autogenerated from old docs and edited manually in database), so once that done, I will review all the docs and add/edit everything that should be there.
  • paulclingerpaulclinger Member
    edited October 2013
    @Mells, I agree; although I do have an item in troubleshooting section about finding mobdebug (http://studio.zerobrane.com/doc-remote-debugging.html#troubleshooting), I should probably add it to the FAQ and mention "Show Package Contents" as well.

    Did you get it working?
Sign In or Register to comment.