Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Live Coding Connection Refused — Gideros Forum

Live Coding Connection Refused

Unknown Member
edited November 2013 in General questions
Hi,

I've been trying to use the ZeroBrane Debug Server to debug my app while testing in the GiderosAndroidPlayer using the various examples available on the web and those which come in the ZeroBrane samples. Here is what I have done so far...

-Included the mobdebug and socket lua files in my project
-Included a require("mobdebug").start() in main
-Set ZeroBrane interpreter to Gideros
-Started the ZeroBrane Debug Server
-Set the Gideros player to the GiderosAndroidPlayer IP address
-Pressed play in Gideros Studio

The code uploads to the device but when it tries to connect to the Debug Server it comes back with a "Connection Refused". I have tried this on both Windows and Mac computers, disabling firewalls, and checking the Debug Server port is open. I have tried specifying localhost and the specific ip address for the debug server in the ZeroBrane settings file and changing the port number.

I think I am now thoroughly stuck and would really appreciate any help you can give as I am now at a point where I need to debug the impact of rotating the device.

Thanks!

Comments

  • Hi @AtomicJim, this is the process I follow (almost the same as yours but it may help):

    - Start ZB IDE and set working directory
    - Start Gid IDE and open project
    - Start Debug server in ZB, output should read like "Debugger server started at MACHINE_NAME:8172"
    - In Gid IDE set player settings to localhost
    - In Gid IDE Start player
    - In Gid IDE Click play
    - Code should then break in ZB for you to debug

    Some extra considerations are:
    - Make sure you have a stage:Event.ENTER_FRAME so you have something to break into
    - Check this post, I had issues at the start with some programs affecting the Gid player, http://www.giderosmobile.com/forum/discussion/1971/gideros-player-not-working#Item_10
    - Make sure you have require("mobdebug").start(); in the start of your code somewhere (which you do)
    - Make sure you have mobdebug.lua and socket.lua in your project

    NOTE: if you have something like require("mobdebug").start("192.168.0.2"); and you don't start the ZB debugger it will take a while (until the ZB debugger connection times out [about 30 secs]) until it will connect to your device. This is not for localhost though but if you try and deploy to a device for testing.

    I have not changed firewall settings on my PC, it should not affect the connection to localhost.

    Sometimes I cannot get the connection to re-initiate (usually after hours of running/stopping) so I have to restart both IDE and start again.

    Let us know if this works.


  • @AtomicJim, @click2install is correct, you need to specify the address in the start() call for on-device debugging to work.

    I just answered a similar question on SO: http://stackoverflow.com/questions/20280137/zerobrane-debugserver-connection-refused/20305114#20305114 and referenced a way to start on-device debugging from ZBS, which is described in this forum post: http://giderosmobile.com/forum/discussion/comment/20903
Sign In or Register to comment.