Troubleshooting VEX VS Code Extension with macOS

The VEX VS Code Extension depends on helper command-line tools to detect VEX brains and controllers, compile projects, and download them to hardware. Tools like these are built for Macs running an Intel chip. Those using Apple Silicon chips will need to install Rosetta 2 to run on macOS. If macOS attempts to run them without Rosetta 2, you may see a errors such as:  Bad CPU type in executable or Fatal Error: Unexpected end of JSON input.

To resolve this issue, install Rosetta 2 on your Mac, then try using the VEX VS Code Extension again.

Install Rosetta 2

Before beginning, start by closing VS Code, this will ensure that the VEX VS Code Extension will restart cleanly after Rosetta 2 is installed.

macOS Launchpad search used to find the VEX VS Code Extension app

1. Select the Apps icon.

macOS search results with Terminal selected for opening the Terminal app

2. Search for Terminal and select the icon.

macOS Terminal ready for entering troubleshooting commands for the VEX VS Code extension

3. The Mac's Terminal will open.

Terminal command to install Rosetta on macOS: softwareupdate --install-rosetta

4. Run this command:
softwareupdate --install-rosetta

Terminal prompt to type A and press Return to accept the software license.

5. You will be prompted to agree to the software license agreement.

Type A and press return to agree and begin installing Rosetta 2.

Terminal confirms Rosetta 2 installed successfully.

6. The Terminal will say Install of Rosetta 2 finished successfully.
 

VS Code with the VEX extension open, showing project creation options and no VEX device connected.

7. You can now open VS Code and use the VEX VS Code Extension to code your projects!
 

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: