Gideros is a flexible framework for developing mobile applications for iOS and Android platforms. It is using Lua as its scripting language and after several people on Gideros forums expressed their interest in using ZeroBrane Studio IDE, I thought I would take a look at supporting Gideros in the IDE.
ZeroBrane Studio supports two ways to debug applications. One way is to launch the application from the IDE, which allows for tighter integration as the IDE can set the environment for the process and can kill the process when the user aborts debugging or running the application. Another way is to start the application externally and make it connect to the debugger in the IDE, thus allowing the IDE to control the application. This second way was my first recommendation and it took couple of hours to implement support for debugging in the IDE.
The video below demonstrates debugging support for Gideros scripts in ZeroBrane Studio (you may need to switch the video to 720p to make the text more readable):
To enable the integration shown in the demo, you need to do these three steps:
require("mobdebug").start()line to your
- Select Gideros as an interpreter in ZeroBrane Studio going to
Program | Lua Interpreters | Gideros. In addition to enabling debugging, it will also turn on auto-complete for Gideros API calls. If the Gideros player executable is in a default location (
/Applicationson OSX or
D:\Program Fileson Windows) or in one of the folders listed in
PATH, it will be found by the IDE. If the executable is in a different location, you may need to specify this location in
cfg/user-sample.luafor details on how this is done).
- Set the project folder to point to your project location by using the Project pane on the left side of the IDE window; for example, point it at one of the examples at
D:\Program Files\Gideros\Examples\Physics\Sleeping Bodies.
You can now open
main.lua file from your project in the IDE and use
Project | Start Debugging command to debug your application.
Another interesting aspect of Gideros and ZeroBrane Studio integration is that it also allows debugging and live coding of applications running on an actual device.