Saturday, January 28, 2012

Lua Development Tools Koneki, IDE based on Eclipse

Just got a comment from developers of Lua IDE Koneki on my previous post about setting up Eclipse-based Lua IDE. So, I gave it a try and it is quite neat, I really hope the developers can keep it moving and make it a great default IDE for Lua developers ;-) As of now, I feel it is not yet conveniently as useful as LuaEclipse I posted about a while back. But the project is under active development and it will become better every day, I am sure.

Here is a quick rundown what I have tried so far:

1. Installation: they offer both standalone and update site, I just installed through update site following their instructions. I am on Eclipse 3.7.1, btw. I also got lua and luarocks installed through Homebrew (by default they are installed in /usr/local/bin).

2. Create a new Lua project: create a new Lua project, add source files under src, similar to the typical Java projects.

3. Ready to run? I feel stuck at this step at first since there is no launch configuration that allows me to configure the local Lua environment. After running through several threads, it seems Koneki does not support launch configuration yet. It only supports "remote debug launch configuration".

But the developer also provides this workaround using "External Tools" and I got it to run and show the results in Console View. This is the sample configuration (you need to select the main.lua before run this external tool configuration). For the meaning of Eclipse variables like ${workspace_loc}, ${resource_loc}, see Eclipse external tools documentation.


4. Debugging. LDT supports remote debugging via DBGP, you can follow the LDT user guide to set it up.

Many thanks to the LDT developers for this nice IDE. I wish the launch configuration can be added so beginners like me can get started with Lua and LDT quickly. Also, I wish the configuration of debugging and remote debugging can be integrated into LDT.

3 comments:

  1. Tried this, but could not get it to work initially, because I have other files in the 'src' directory that cannot be 'required' from lua due to the paths not being set correctly. ${workspace_loc} is not the container of the lua files.

    To fix this I had to use the following values for;
    Working directory: ${container_loc}
    Arguments: "${resource_name}"
    (for the latter one include the double quotes)

    ReplyDelete
  2. > "Also, I wish the configuration of debugging and remote debugging can be integrated into LDT."

    You should check out the latest 0.9M1 milestone then! :)

    See http://blog.benjamin-cabe.com/2012/08/25/support-for-lua-interpreters-in-koneki-ldt-0-9m1 and http://www.eclipse.org/koneki/new_and_noteworthy.php

    ReplyDelete
  3. Hi, Ben, this is really cool! I will check it out.

    ReplyDelete