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.

The macOS Launchpad icon showing a search bar above a grid of colorful app icons.

1. Select the Apps icon.

The macOS search interface showing the Terminal app highlighted after searching for “terminal.”

2. Search for Terminal and select the icon.

A macOS Terminal window displaying a command prompt after login.

3. The Mac's Terminal will open.

A Terminal window showing the command softwareupdate --install-rosetta highlighted.

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

A Terminal window prompting the user to type “A” and press return to agree to 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.

A Terminal window showing the message “Install of Rosetta 2 finished successfully.”

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

Visual Studio Code with the VEX extension open, showing options to create or import a project and a workspace with 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: