Codea Air CodeThis extension can connect remotely to the Codea iOS application, allowing to modify, tweak and debug Codea projects directly from Visual Studio Code. Auto-completion and documentation features similar to Codea are available while working on the projects. Table of ContentsFeaturesEditorOnce connected to Codea, Visual Studio Code will list all the projets availables with their files and dependencies, allowing modifications even if a project is running. Assets such as images, sounds and models are also available and can easily be integrated in a project. Auto-CompletionAuto-completion is available for the Codea API as well as symbols defined in the project and its dependencies. SymbolsColorsMethods such as Font and SpritesThe SnippetsSnippets make it easier to format the different Lua control structures such as DocumentationTypes can easily be documented using a triple-slash ( SidebarThe Codea Sidebar gives access to Reference and Parameters sections as shown below. ReferenceThe Codea Reference section of the Sidebar contains the full documentation for Codea Legacy (3.x) and Modern (4.x) which can be navigated by clicking on the different chapters and functions. It is also possible to select and right click a word in a project's code to find the corresponding reference in the Legacy documentation (or using the SearchThis extension uses a virtual File System Provider to read the files from Codea. However, VSCode does not yet support searching in files provided this way (see this issue). Until the feature is implemented, the extension provides its own limited version which will search in all files of the currently active project. ParametersThe second section of the Codea Sidebar will show the current parameters for the running project, if any. All parameters can be controlled directly from Visual Studio Code even if the parameters are hidden in Codea, making it easier to tweak the projects. DebuggerWith a project running, Visual Studio Code can be used to attach to the running project and then used for debugging. Values of variables and watches can be modified while the execution is paused. Conditional BreakpointsTo set a condition on a breakpoint, right click a breakpoint and select Enter a valid Lua expression which must be Log PointsLog Messages can be set on breakpoints to print the message in the Debug Console instead of breaking the execution. This can also be used to print the result of expressions within curly braces as can be seen in the following example: InstallationSearch for "Codea Air Code" in Visual Studio Code's Marketplace and install the extension. UsageConnectionAfter installing the extension, open the Command Palette (Ctrl+Shift+P on Windows, ⇧⌘P on Mac), and run the After typing Enter or clicking the command, Visual Studio Code will ask to select a device or enter the IP and port to connect to: To find the device's IP to connect to if the device is not in the list, use the Air Code icon on the project selection screen in Codea. The default port is Fun Fact
USB ConnectionIf Wi-Fi is not accessible or is slow, you can connect to Codea over a USB connection using iproxy, a utility part of libusbmuxd (or libimobiledevice). For Mac and Linux platforms, libusbmuxd can be installed through Homebrew using Windows executables including iproxy.exe are also available (look for Once iproxy is available, use the Multi-windowAir Code does not currently support multiple Codea windows or running projects. For this reason, when running a project from Air Code, all windows will be closed except one before running the project. Files and DependenciesFiles can be added, removed or renamed in Codea using the corresponding operations in Visual Studio Code. Dependencies can be added to the active project (based on the current file being edited) using the To remove a dependency, simply delete its corresponding folder in the Explorer. AssetsAssets such as images, sounds and models can be found under the Assets folder. New assets can be added by simply dragging them into a project folder, the Documents folder under Assets, or an External Folder referenced in Codea. To reference any asset in a project, simply drag-and-drop the asset from the Explorer view while holding the Shift key into a Lua file and the Asset Key will automatically be added. CommandsAll commands included with this extension are prefixed with
RequirementsCodea 3.10 LicenseChange LogSee the change log here |