Codea 3.8 (383)

Trying to do a Reference from the Do menu / Reference returns a 404 error for 4.x . As for the Air Code update, I don’t use Air Code so I can’t comment on that.

1 Like

@jfperusse - first dumb question. Installed Codea addon into VScode and then opened a browser and pasted the text Codea: Connect to Host … in and pressed return. It then produce a
‘SSH : connect to host 192.xx port 22: connection refused’ error
I think it may be due to the formatting - any suggestions how about a vid ?

Hi @Bri_G !

You shouldn’t use a browser anymore. Instead, refer to the Usage section (GitHub - twolivesleft/codea-air-code: Visual Studio Code extension for Codea Air Code) which explains how to run the Connect to Host… command from Visual Studio Code.

All your editing, tweaking and debugging can now be done directly from Visual Studio Code instead of a web browser.

I hope it helps clarify a few things. We’re thinking about doing a video tutorial as well if this could help.


@jfperusse - sorry if I come across as being a little thick but where exactly do you use the command and what is the precise format of the command.

@Bri_G . First you need to open the Command Palette in VSCode (Ctrl+Shift+P on Windows, ⇧⌘P on Mac). Once the palette is opened, start typing “Codea: Connect to Host…”. You don’t have to type it completely, you can click it once you see it in the list. (I’ll add screenshots to the

It will then ask you to enter Codea’s IP, which you can find inside Codea on your device by clicking on the Air Code icon on the project selection screen. Enter that IP and Port in VSCode and press Enter. VSCode should reload and now be connected to Codea.

AaaH - it’s a sequential dialogue - I’ve been literally typing in the command and IP address as in your instructions.

Thanks again.

Thank you! I’ve clarified this in the README and will add screenshots as soon as possible.

It looks like you guys improved the way text selection works in the output window. I love it. Little improvements like that really mean a lot sometimes.

1 Like

The latest version of V4 doesn’t run for me at all. Just doing

function setup()

causes errors to print constantly. The only way to stop the program is to force close it. I’m just running this on my iPad, but it does the same thing on my iPhone.

See the image for some of the error messages.

@jfperusse - loaded the new Air code on my Mac and, after a little trouble, got it to work with a little project I was doing.

Then I started a small issue that Killer.Jo had raised and saved that to my local drive and then tried to download to my iPad - didn’t see my iPad only the folder that I saved it to locally.

This must be due to loss of connection, could you describe how to recover connections after their loss - I think this could be a regular occurance until I have mastered it.

Also - the editor has started placing anticipated words into the code. I found I had to press return to accept them and then go back to edit what it had placed in the code. No big deal just need to watch what you are typing and correct later.

This is related to the new Air Code. We’ll investigate.

@Bri_G Any details on the troubles you had to get it working so we can improve our documentation?

If you are using the extension, the files you see are those from the device and are not meant to be on your local drive. However, if you get disconnected, it’s possible it will currently let you update the files mistakenly and it will simply fail to update Codea.

To restore the connection, if your device is still running Codea with the project opened, it should be as simple as focusing back in VSCode. It will try to reconnect anytime you go back to VSCode, but this is something else we could improve with a connection status, and maybe a button to try reconnecting. I think the files should also be read-only whenever the connection is lost to avoid confusion.

It’s quite possible VSCode’s intellisense is suggesting autocompletion, which is a basic feature of this code edtior. If you don’t want to auto-complete a word, you can continue typing normally, or hit escape to close the suggestions. You don’t have to accept a suggestion to then go back and modify it. However, this can be a very powerful feature.

I’m currently looking into other extensions we could install to improve this. For example, I’m sure some existing Lua extensions could automatically add “end” keywords when writing ifs, but we need to change something in the Codea Air Code extension first for this to work. I’ll keep you posted :slight_smile:

Thanks again for playing around with the new Air Code!

@dave1707 Actually, I just realized we’ve already fixed it, so it should be in 3.8 (377). Thank you!

@jfperusse - another point. Forgot to mention, a dialogue box in red text popped up in the bottom right corner saying that the connection had been lost, it incremented each time I tried to re-connect.

Also in the files section at the top left, the IP of the connection to my pad was displayed followed by a greater than symbol. On clicking the latter a line below showed the same address. Is this what you expect to see?

@Bri_G Yes, you will see something like this whenever you’ve lost connection.

When this happens, it means connection was lost to the device. Was your device still running Codea with the project opened when this happens, with the screen on? If so, it’s possible there might be a bug with the server not running anymore, and you could try killing Codea on the device and launching it again to see if it resolves the issue.

@jfperusse - the short answer is no. I had stopped the Codea project that I was running and loaded up a new template. Your image reflects what I saw on my Mac with the blue icon on the settings gear and the other blue icon on the files icon at the top.

I think the issue is how I operated VScode rather than the extension to it. Probably down to my lack of experience with editing live with a system link in place.

@sim The below code crashes Codea sometimes when it’s run right after loading Codea. Not sure why the viewer.close() causes the problem. Tap screen to close the program and return to the editor or crash.


function setup()

function draw()
    background(236, 177, 67)
    text("tap screen to return to editor",WIDTH/2,HEIGHT/2)

function touched(t)
    if t.state==BEGAN then
1 Like

Thank you for this, will look into it

@dave1707 - isn’t that the same exit structure that you used on the demo for Killer.Jo ?

I ran that a couple of times and it didn’t crash on me

I’m able to reproduce it, but it seems like a complicated one. We’ll have to isolate the code that caused the change by checking out some versions in history and trying to reproduce it at various points