@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.
@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.
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.
…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.
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:
@jfperusse - been a little busy over last couple of weeks but, when I had the time, tried to get more into Aircode 2. But - ran into problems, can’t seem to get a link.
Checked out your updated docs and seems to cover everything. I get the Code: Connect to Codea Host up and it fires up the IP address greyed out, but when I enter the address it doesn’t appear to link. Are there any other visible signs the show status of link?
@Bri_G Could you try with the latest version of Codea’s beta (3.8, 379) and the 1.1.4 version of the VSCode extension?
Make sure you use the Codea: Connect to Host... command again in VSCode as we’ve made lots of changes to how the connection is working (this should only be needed once).
@jfperusse - OK, up and running with beta(3.8,379) and 1.14. Got the link there, green label in bottom right hand corner with 90 deg rotated ‘Ls’ I am assuming means the link is in place - does it turn red and show a broken symbol if broken.
Tried a lot of things to get it running and succeded but I hadn’t picked up on the fact that before you start with VScode editing you have to create the link and then open a file in the Codea editor on your pad (my impatience I dove in typing and ended up in a mess - resolved it though).
I noticed when the Codea editing page is linked the editing option buttons at the top are greyed out, I assume that is so you are meant to use only the run button ? Although the drop down menus still appear when you tap on the greyed buttons.
Secondly - in the VSCode Explorer on the left you have OPEN EDITORS heading, when you click to open that you are presented with a white dot followed by a blue icon and the the text of a title. Is this the project title or the Codea tab title ?
Then under the CODE section below you get a > followed by the project title, which when clicked on converts to a V with the title and below icons with the Codea tab name.
Are these symbols and colours defined by VScode ? If possible different icons, colours for projects and tabs would make it clearer.
Figured out that you have to save the project tab you are working on to update the Codea tabs involved it’s not an automatic update.
I’ve used VSCode before, but just for web design, the interaction with Codea is an exciting new feature but it will take me a while to delve into it and pick up any eccentricities that are new to me.
Thanks for the help. Will pursue this and report back any issues I encounter.
Edit: Oh, almost forgot a message fired up in the bottom right corner about a non-existant file, not sure how I managed to confuse it. If it appears again I’ll let you know how I managed to generate it.