Löve debugging with ZeroBrane Studio

General discussion about LÖVE, Lua, game development, puns, and unicorns.
paulclinger
Party member
Posts: 221
Joined: Thu Jun 28, 2012 8:46 pm

Löve debugging with ZeroBrane Studio

Post by paulclinger » Fri Jun 29, 2012 10:26 pm

Hi All,

I've been teaching my 8-year old son programming in Lua using the IDE I've developed and noticed how excited he got when I showed him a simple Löve game. It wasn't in my plans, but I thought it may be a good exercise to see how extensible the IDE I've been working on is and to make it easier for him to debug his scripts, so I added auto-complete and debugging support for Löve (thanks to Santos for posting löve API as a Lua table). I made a blog post with a brief description and a screencast here: http://notebook.kulchenko.com/zerobrane ... -debugging.

Before doing that I thought I'd look for what's out there and found a good dozen of IDE projects, most of which seem to be dead now (love studio is probably one exception):
There also seems to be enough interest in having some IDE for debugging of Löve scripts, as indicated by the following topics (with some people using code editors and others using Decoda or Koneki/LDT):
The source code for the IDE (in Lua) is available on github; the packaged versions for windows and Mac are available on the project website. The current version in the repository also runs on Linux. I'll take questions/suggestions here (if any), but if you come across an issue, please open a ticket on github.

Paul.
Last edited by paulclinger on Fri Sep 21, 2012 3:03 am, edited 1 time in total.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Löve debugging with ZeroBrane Studio

Post by bartbes » Sat Jun 30, 2012 8:09 am

This looks pretty interesting. I'm on linux, though, and even if it was out, I doubt I could leave my beloved vim behind.

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Löve debugging with ZeroBrane Studio

Post by coffee » Sat Jun 30, 2012 11:47 am

With all respect paul for your work the problem of any custom editor made for LOVE is that the benefits of debugging (or any other LOVE oriented feature) don't make intermediate/advanced coders leave their favorite editors. You can have some positive responses from first-time coders and LOVE beginners but anyone else that need an editor for a couple more languages won't look at this with much enthusiasm. Also you have the problem that your editor is OS dependent. So anyone like me (using OSX) or Linux can't even work or test it easily. So don't be surprised that all that editors end "dead".

Santos
Party member
Posts: 383
Joined: Sat Oct 22, 2011 7:37 am

Re: Löve debugging with ZeroBrane Studio

Post by Santos » Sat Jun 30, 2012 12:56 pm

Congratulations! :awesome:

While admittedly I also can't imagine using anything other than Vim for now (until Light Table is released), I would guess that debugging support will be useful for a lot of people. Live coding could also be a compelling use case. Do the number sliders work with LÖVE? LICK may be of interest.

paulclinger
Party member
Posts: 221
Joined: Thu Jun 28, 2012 8:46 pm

Re: Löve debugging with ZeroBrane Studio

Post by paulclinger » Sat Jun 30, 2012 4:48 pm

@bartbes and @coffee, MacOS version is in the works (https://github.com/pkulchenko/ZeroBraneStudio/issues/14) and I expect it to be available in the next version and match the features of the Windows version. The linux version will take a bit longer, but there has been some interest around it and I opened a ticket for those who may have time to contribute (https://github.com/pkulchenko/ZeroBraneStudio/issues/15).

In terms of the support for intermediate/advanced coders, I'm not trying to convince people to leave their favorite editors. In fact, outside of Lua development, most of my consulting work is done using vim running in a terminal window. Still, having to support only one language allows me to provide features that are not available in more general-purpose editors. Live coding (as noted by Santos) is one of the features, but there are others (like stack view with a hierarchy of local/upvalue variables or an integrated remote console that allows you to change your code while your app is being debugged) and I have plans for more; some of those may be of interest to more experienced developers too.

paulclinger
Party member
Posts: 221
Joined: Thu Jun 28, 2012 8:46 pm

Re: Löve debugging with ZeroBrane Studio

Post by paulclinger » Sat Jun 30, 2012 4:57 pm

@Santos, the sliders don't work with Löve debugging at the moment, mostly due to a different control loop that Löve is using. There are some technical challenges, but I think it is doable and it may end up being even more powerful than the current live coding as (if what I'm trying is going to work) this will allow you to update the code without restarting the game.

I checked LICK and it looks like an interesting approach to live coding; the way it's done in ZeroBrane Studio is completely different, although in terms of the end result it may look similar. I'll update the thread with the result of my experiments.

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Löve debugging with ZeroBrane Studio

Post by coffee » Sat Jun 30, 2012 6:11 pm

paulclinger wrote:MacOS version is in the works and I expect it to be available in the next version and match the features of the Windows version. The linux version will take a bit longer, but there has been some interest around it and I opened a ticket for those who may have time to contribute.
That's good to know and welcomed. Even that Zerobrane wouldn't turn the main editor of many of us could became an valuable asset in LOVE dev.

User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Löve debugging with ZeroBrane Studio

Post by _ex_ » Mon Jul 02, 2012 5:56 am

This is way awesome!
I was planning to do exactly this for my Lua dialect and you have done already a lot of the work for me :D

kclanc
Citizen
Posts: 89
Joined: Sun Jan 29, 2012 6:39 pm

Re: Löve debugging with ZeroBrane Studio

Post by kclanc » Mon Jul 02, 2012 10:32 pm

Pretty cool. When I tried debugging zoetrope, I initially got a bunch of warnings about accesses to the undefined global jit on mobdebug line 430. After commenting that line out, everything seemed to work fine. I like how you can embed links in the comments in this editor. Are you planning to add the ability to trap errors? For me, that is an extremely important feature for a debugger. I'm also curious about the type/class guessing that you mention in the project's wiki. How does that work?

paulclinger
Party member
Posts: 221
Joined: Thu Jun 28, 2012 8:46 pm

Re: Löve debugging with ZeroBrane Studio

Post by paulclinger » Tue Jul 03, 2012 12:21 am

kclanc wrote:Pretty cool. When I tried debugging zoetrope, I initially got a bunch of warnings about accesses to the undefined global jit on mobdebug line 430. After commenting that line out, everything seemed to work fine.
I added a local variable to reduce the number of messages on jit global to one. It seems like löve is using some sort of "strict" module, which I didn't realize.

> I like how you can embed links in the comments in this editor.

it implements limited Markdown support, so you can add links, headings, and bold/italic/code/highlight text.

> Are you planning to add the ability to trap errors? For me, that is an extremely important feature for a debugger.

Can you elaborate a bit more on what you mean by trapping errors? Right now I simply report everything that the app throws.

> I'm also curious about the type/class guessing that you mention in the project's wiki. How does that work?

Where on the wiki? We do plan to implement type/class guessing, but it has not been completed yet.

Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests