Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » Debugging for Corona SDK
Debugging for Corona SDK [message #1416355] Wed, 07 March 2012 14:06 Go to next message
Jarrod Bellmore is currently offline Jarrod BellmoreFriend
Messages: 6
Registered: March 2012
Junior Member
I have been recently looking into doing cross platform game development for mobile platforms using the Lua based Corona SDK. The Koneki plugin for Eclipse looks absolutely fantastic and I would love to be able to use it to develop and debug Corona SDK games.

I am fairly new to both Corona as well as Lua (been developing in other languages and platforms for years) so I am slowly putting all the pieces together. One thing I have not been able to find is a great (visual) debugging tool that can work with the Corona SDK simulator. They have a command line debugger, which to the best of my knowledge is based on RemDebug but is a closed source custom version of it, and that will work but can really slow down the development progress having to rely on a command line debugger.

I do not know all of the specifics of Lua debugging using remote debugging but has anyone gotten the remote debugging capabilities of Koneki to work the Corona simulator? Should the steps mentioned in the Remote Debugging section (3.1) of the user guide work for games running within the Corona simulator?

If anyone has gotten it to work, what were the steps required to get it setup?

Hopefully that all made sense...

Thanks!
Re: Debugging for Corona SDK [message #1416356 is a reply to message #1416355] Wed, 07 March 2012 17:43 Go to previous messageGo to next message
Nicholas Green is currently offline Nicholas GreenFriend
Messages: 2
Registered: March 2012
Junior Member
+1

Looking for the same thing. I've been doing a lot of Actionscript development in the last couple years and switching back to command-line feels kluge and slow.
Re: Debugging for Corona SDK [message #1416357 is a reply to message #1416356] Thu, 08 March 2012 00:21 Go to previous messageGo to next message
Jarrod Bellmore is currently offline Jarrod BellmoreFriend
Messages: 6
Registered: March 2012
Junior Member
Well I have made some progress in this and it appears debugging IS possible, at least somewhat. Basically what I have working so far is the ability to set breakpoints, step into methods (including in other lua files other than main.lua) and view simple (non table) variable's values in the variables windows within Eclipse. Unfortunately it looks like expanding a table is not going to be possible as the Corona SDK has a sandboxed Lua environment that does not include the loadstring() method, which apparently the debugger uses to retrieve the keys and values from tables. Whenever I try to expand a table in the variables window I get the following message in the console:

ERROR: loadstring() is not available in Corona

Note that I am running the game using the Corona SDK Simulator and not the debugger they provide, so perhaps they allow loadstring() in the debugger? I tried to load it up using the debugger and the debugger just hangs so maybe I am missing something? Not sure if there is a name collision with the built in Corona debugger and the debugger being used by Koneki? I might try to rename the Koneki debugger module and see if that works.

If I get some time tonight or tomorrow I will try to put a guide together for you to show how I got it setup.
Re: Debugging for Corona SDK [message #1416358 is a reply to message #1416357] Thu, 08 March 2012 00:37 Go to previous messageGo to next message
Jarrod Bellmore is currently offline Jarrod BellmoreFriend
Messages: 6
Registered: March 2012
Junior Member
Well another update, apparently I was just being thick and forgot to realize that when the Corona debugger starts up, it pauses on the first line of the main lua file! As soon as you tell that to continue the game loads in the simulator just fine. I am happy to report good news, the variables window can now drill into the table values properly!

I will definitely put together a little tutorial for how I got this setup and working. I would also just like to take this time to say that Koneki is great and I am so happy that I found it! Major props to the creators and contributors...
Re: Debugging for Corona SDK [message #1416359 is a reply to message #1416358] Mon, 12 March 2012 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jarrod,

Thanks so much for the kind words!
Actually I tried to play with Corona a while ago, and I was stuck with the loadstring() problem too. I didn't try to use the debugger VM, but indeed it seems to be working great. In case you don't know, not only it allows you to browse tables contents, but it also permits to define conditional breakpoints (i.e. halt only when a given expression evaluates to true)! Just right-click on a given breakpoint and select the menu entry "Breakpoint Properties..." in order to change the breakpoint behaviour.

That would be awesome if you could write a quick tutorial, since I think it will be very helpful to the Corona community! Please keep us posted here when you'll have done it, I'll be happy to relay it on Koneki website too!


On a side note, you should check out the beta version of LDT mentioned http://lua-list.2524044.n2.nabble.com/ANN-Koneki-LDT-smart-content-assist-available-in-beta-td7287990.html to get better support (i.e. content assist) for Corona SDK!

Cheers,
Ben.
Re: Debugging for Corona SDK [message #1416385 is a reply to message #1416355] Tue, 03 April 2012 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Hey Jarrod,

Any chance that you had time to put up some kind of debugging tutorial for Corona, as you mentioned earlier in this thread? Anything I could do to help?

This would fit along nicely with this http://www.youtube.com/watch?v=XOlopalLKeU! 8)
Re: Debugging for Corona SDK [message #1416392 is a reply to message #1416385] Mon, 09 April 2012 18:16 Go to previous messageGo to next message
Gregory Chandran is currently offline Gregory ChandranFriend
Messages: 4
Registered: April 2012
Junior Member
Hi Jarrod, Anyone,

I managed to setup koneki and eclipse and am wondering if we can debug remotely using corona debugger? did you manage to set this up? If not, how would I go about developing in corona, using the same setup?
Re: Debugging for Corona SDK [message #1416393 is a reply to message #1416355] Mon, 09 April 2012 18:16 Go to previous messageGo to next message
Gregory Chandran is currently offline Gregory ChandranFriend
Messages: 4
Registered: April 2012
Junior Member
Hi Jarrod,

I managed to setup koneki and eclipse and am wondering if we can debug remotely using corona debugger? did you manage to set this up? If not, how would I go about developing in corona, using the same setup?
Re: Debugging for Corona SDK [message #1416412 is a reply to message #1416393] Mon, 23 April 2012 09:10 Go to previous messageGo to next message
Eclipse UserFriend
Hey guys,
I just http://www.youtube.com/watch?v=cZdn1yDrH8Y to help you setup the LDT debugger for CoronaSDK apps.


Hope you'll find it useful!
Re: Debugging for Corona SDK [message #1416413 is a reply to message #1416412] Tue, 01 May 2012 12:06 Go to previous messageGo to next message
Girish Joshi is currently offline Girish JoshiFriend
Messages: 2
Registered: May 2012
Junior Member
Thanks for this very helpful info. I tried it on win32. It works very well. Only problems is that on connecting to debugger and opening debug perspective, it opens a blank tab for main.lua. The editor window shows 'debug source lookup '. The tab title shows correct path to project main.lua but all in small case. I think path has to be case sensitive. Please let me know how to fix this.
Re: Debugging for Corona SDK [message #1416414 is a reply to message #1416413] Tue, 01 May 2012 15:40 Go to previous messageGo to next message
sean bean is currently offline sean beanFriend
Messages: 4
Registered: May 2012
Junior Member
Hi everyone.
I just have a quick question, I can get the debugger up and running thanks to Benjamins tutorial. However, if I then make changes to my code and save my .lua files, the debugger disconnects, and I have to close corona simulator and debugger, then relaunch from the beginning in eclipse. I was just wondering if there was a quicker way.
Re: Debugging for Corona SDK [message #1416415 is a reply to message #1416414] Wed, 02 May 2012 09:15 Go to previous messageGo to next message
Eclipse UserFriend
sean bean wrote on Tue, 01 May 2012 17:40
> Hi everyone.
> I just have a quick question, I can get the debugger up and running thanks to Benjamins tutorial. However, if I then make changes to my code and save my .lua files, the debugger disconnects, and I have to close corona simulator and debugger, then relaunch from the beginning in eclipse. I was just wondering if there was a quicker way.


Hello Sean,
Unfortunately there is a "facility" in the Corona simulator and debugger that makes it automatically restart whenever a file is modified so as you can immediately see the result of the modification. Maybe you should ask to the Ansca ppl whether it is possible to disable this behavior by using a command line parameter?
In the meantime we could have a special parameter in the LDT debug config to never end a debugging session even though the application under debug has been restarted.
Re: Debugging for Corona SDK [message #1416416 is a reply to message #1416415] Wed, 02 May 2012 10:40 Go to previous messageGo to next message
sean bean is currently offline sean beanFriend
Messages: 4
Registered: May 2012
Junior Member
Thanks for your response, I just want to clarify what I need to ask the corona guys, so in the event that the corona guys do change anything its useful for the koneki guys to work with.

During a corona debug session; when code is modified, the simulator restarts, but the corona debugger doesn't, instead I get:
Program finished
logout
[Process completed]

So I'm guessing that when code is modified, we want the simulator and debugger to restart and pause on the first line. If this happens is it then possible for the eclipse remote lua debug process to allow the corona debugger to disconnect and then change state to listen to remote debug connection attempts again, so that when the corona debugger restart it automatically connects to the eclipse remote lua debug process ?

I was also wondering if it was possible to do it without any changes to corona, but instead call to launch corona debugger/simulator from within eclipse lua remote debug and be able to quit the processes within eclipse too. Then synchronising this automatically with a lua remote debug process ?
Re: Debugging for Corona SDK [message #1416465 is a reply to message #1416413] Fri, 25 May 2012 21:37 Go to previous message
Amu Shan is currently offline Amu ShanFriend
Messages: 2
Registered: May 2012
Junior Member
Hi Girish

You mentioned "on connecting to debugger and opening debug perspective, it opens a blank tab for main.lua".

You may have figured out that the Koneki plugin has a bug when running on Windows - it can't recognise a filename which has a space in it.

I hope Benjamin will fix this bug because Koneki is amazing and we all want it to 'just work' as a certain Jobs used to say, right out the box.

Here is an error message that might help Benjamin locate the bug, when Eclipse tried to reload a file that had a space in a directory name:
**
Could not open the editor: Factory
org.eclipse.dltk.ui.ExternalSourceModuleEditorInputFactory returned null from
createElement for editor id=org.eclipse.koneki.ldt.editor name=DBGP:
/c:/users/amu/documents/corona/gears animation/ansca-gear-animation-082bd66/6.
multires/main.lua
**
Previous Topic:Re: ldt under ubuntu 12.04 64bit not running
Next Topic:Debugger timeout on 3.7.2, Windows 7 x64
Goto Forum:
  


Current Time: Fri Mar 29 14:54:52 GMT 2024

Powered by FUDForum. Page generated in 0.04748 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top