Getting visual studio to run WPIlip on mac

I’ve installed VS Code and WPIlib on a Mac, following the instructions here:
https://docs.wpilib.org/en/latest/docs/getting-started/getting-started-frc-control-system/wpilib-setup.h
I get as far as opening VS Code, but don’t find any of the WPI commands in the command pallet. I also don’t seem to have any of the extensions available to install. Has anyone had luck getting WPIlib working on MacOS? Did you do anything differently from the instructions?

Have you followed the instructions titled “Installing the extensions for WPILib development” under the macOS tab?


Download the vsix from here and download using vsix

Do not do that. If you only the VSIX from that page you will not have guaranteed offline access to the needed maven artifacts. This means you might not be able to deploy at an event without internet access.

Follow the official installation steps.

2 Likes

Oh woah I didn’t know that. My bad.

Hi, I’m a mentor helping with this team. We followed the instructions in the MacOS tab. There are no extensions listed in the command pallet to install when we get to that step. Just Generic VS Code stuff, nothing FRC related. (no WPIlib commands etc.) Did we miss a step?

I would confirm that you have completed the steps titled “Installing the extensions for WPILib development”. That involves installing 5 VSIX files from the wpilib/2020/vsCodeExtensions directory into VS Code.

The command pallet command to do this is called: Extensions: Install from VSIX

I believe you are confused with the existence of “WPILIB: Debug Robot Code” …etc." commands in the screenshot under " Installing the extensions for WPILib development" section in the web page. That screenshot was probably taken after installing the WPILIB extensions, just to show the main command in that step “Extensions: Install from VSIX…”, which is a generic vscode command. Ignore the appearance of WPILIB:… commands in that screenshot and proceed with installing extensions from VSIX files. You did not miss any step.

I don’t have his Mac with me at the moment, but as I recall, when we type in “Install from VSIX” we do not see the “Extensions: install from VSIX”.

Pressing return at that point opens a Finder window but clicking through the folders in the finder doesn’t find anything we can install.

@Jr2d - could you grab a screenshot of what you see when you type in “Install from vsix”

I followed the instructions and have it working on my mac.

You’ll know whether or not you have successfully followed the untar steps if you see the right directory structure in ~/wpilib/2020.

Here’s what mine looks like (this is copy and pasted terminal output):

MacBook-Pro:2020 newton$ pwd 
/Users/newton/wpilib/2020
MacBook-Pro:2020 newton$ ls
documentation		jdk-11.0.2.jdk		tools
frccode			logs			utility
installUtils		maven			vendordeps
jdk			roborio			vsCodeExtensions
MacBook-Pro:2020 newton$ ls vsCodeExtensions/
Cpp.vsix	JavaDebug.vsix	JavaDeps.vsix	JavaLang.vsix	WPILib.vsix
MacBook-Pro:2020 newton$ 

Then when the finder window pops up, navigate to the vsCodeExtensions directory and choose them in the proper order (which is also on the docs tab):

Cpp.vsix
JavaLang.vsix
JavaDeps.vsix
JavaDebug.vsix
WPILib.vsix
1 Like

That’s really helpful, thanks! I think we just didn’t try hard enough to select the .vsix somehow. @Jr2d please give that a try again.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.