Codea Air Code 2.0 - Beta

Hi everyone,

The new Codea Air Code is now available in beta as of version 3.8 (376).

If you don’t have Visual Studio Code already, you can download it from Download Visual Studio Code - Mac, Linux, Windows.

Once installed, run it, look for Codea Air Code under the Extensions sidebar, and install the extension:

You should then be able to connect remotely to a device running Codea 3.8 (376) using the “Codea: Connect to Host…” command.

Please refer to Codea Air Code | codea-air-code for the usage instructions.

If you try it out, please let us know how it goes here or in our Discord channel.

Thank you!

1 Like

@jfperusse - up and running thanks to your prompt. Will play a while to see how it feels, feedback tomorrow. Already looking impressive.

Thank you.

1 Like

@jfperusse - ran into an issue with Codea using VSCode but I think it may be due tosome other issue. Code seemed to copy down OK but I think a definition gis corrupted by an unseen character. I defined a variable txt10 to a string but the code to print it throws out an error. The code can be found in my last post to @Killer.Jo.

Probably me overlooking something simple !!! just wondered if there is some complication in copying down code from VSCode.

Hi @Bri_G! If you are referring to I NEED HELP (pls) - #70 by Bri_G, I was able to run this fine, but after fixing a few errors in the post:

  • Function → function
  • Center → CENTER
  • Missing “end” at the end of the code

I’m not sure these are the problems you are referring to?

@jfperusse - oh thanks, I think this is because you don’t get autoinsertion of end and my inability to see case issues. I was just worried the text in VSCode had formatting characters in which gave a different value for the text definition.

Thanks for pointing that out, something I’ll have to keep an eye out for when using VSCode.

Ha, good point, I find it annoying too that end does not get automatically added in VSCode. I’ll see if there’s anything we can do about this!

I just tried this out using my iPhone. I never particularly thought I wanted this, but as I added the extension to VS code I realized it could be massively helpful. unfortunately it only successfully connected the first time and then never successfully connected again. I got an error message about it.

Please share about the error message! After connecting once, you shouldn’t have to use “Connect to Host…” anymore as the VSCode window will retry connecting to the same IP, but I realize now we didn’t make this obvious.

…and today it’s working. Computers!

Spoke too soon. My phone went to sleep while I was away and the connection was lost and I can’t seem to get it back.

…I managed to get it working by disabling the extension and then enabling it again and starting over.

…now my problem is that it won’t save my edits from VS into Codea. The little dot that shows that the changes haven’t been saved never goes away, whether I am using command-S or selecting “save” from the menu.

Thanks @UberGoober ! Yeah, I suspect there might be an issue when the device goes to sleep. You should be able to restore the connections after going back to Codea on your device, but it seems like sometimes the VSCode extension waits infinitely after a disconnection.

Note that instead of disabling/enabling the extension, you can instead use the “Reload window…” command.

Do you know how you got in the state where the file won’t save anymore? Was this because you had unsaved changes when the device went to sleep?

I feel fairly certain it’s not, because just before being unable to save a tab, I had tried to save a different tab, but got a little red warning in the lower right corner that asked if I wanted to overwrite a file. So I said yes and it successfully saved, but I was mystified just that extra level by the fact that trying to save the next tab not only didn’t save, but didn’t give me that warning.

I tried quitting Codea, restarting Codea, quitting VSCode, restarting VSCode, disabling the connection, re-enabling the connection, pressing the red “try again” button in VSCode, pressing the blue “try again” button on the alert show in the screenshot, and probably other things I forgot. I am not sure whether or not I tried “Reload window,” but as I went searching for anything and everything I could click on to try to fix it, it’s very possible…

Just had the bug again, and can confirm that “reload window” doesn’t change anything. It is apparently not equivalent to disabling/enabling the extension. Slightly different error message:

By enabling/disabling the extension, did you mean in VSCode, or disabling AirCode in the Codea settings?