WPILib Extension Not Working in VSCode

We had been able to build code in VSCode, but we randomly get errors similar to the following:
command 'wpilibcore.buildCode" not found
command 'wpilibcore.openCommandPalette" not found


When we first started getting the errors, removing the project from the workspace and re-adding found the WPILibCore commands, but now that doesn’t seem to work, restarting VSCode doesn’t work, and rebooting the computer doesn’t work.
We installed the new 2019.2.1 update, and now it consistently doesn’t work. The issues have only been occurring on one computer, the other one seems to run perfectly fine and we are able to build code with the WPILib commands.
How do we get the WPILib commands to work on this computer again because we are stumped?

1 Like

Was this a system that had the alpha installed? You must manually uninstall the alpha extension in order for the season extension to work.

If that’s not the case, we can try a few more things.

Also, you have the wrong folder open in vscode. You need the inner folder with build.gradle and gradlew.bat open, not the outside folder like you have open currently.

No, we did not have an alpha installation.

Ok, something is being weird and causing the extension to crash on startup. In VS Code, go to Help -> Toggle Developer Tools. In there, in the Console tab, is there any red messages? Looking for one that would be related to wpilib. A screenshot would help.

I’m also having a time getting things to work correctly on our main computer (other systems work ok with deploy and intellisense).

VSCode gives an error soon after starting of
Connection to server got closed. Server will not be restarted.

The developer tools console has this
The language server crashed 5 times in the last 3 minutes. It will not be restarted.

This seems like it’s the intellisense, since I can compile and deploy code.

I have tried reinstalling everything and have made no progress. Are there directories I need to delete to completely remove everything before reinstalling?

This is the menu you had us locate. We also tried uninstalling and reinstalling, and the error never left.

Ohhh. Workspaces do not work correctly. My bad, I totally had missed that. You have to be opening a single folder, and you can’t create a workspace. I’ll see if I can fix this in the next release.

This time, instead of File -> Add to Workspace, we did File -> Open Folder and selected the project folder, and this did the trick. Thanks!

While you’re fixing things, we also get this error where it will not build because it says that permission is denied. When we immediately build again, the build finishes without errors.

Thats weird, I’ve never seen that happen before. Does that always happen, or just occasionally? Nothing should be locking folders down like that.

We are having this issue as well. It’s weird because sometimes it will build just fine. Other times permission denied on some file causes it to fail. Retrying works sometimes. Clearing the terminal window seems to help sometimes (though it may be randomly luck). I had a single line of code that seemed to be causing the error (using namespace frc;), but then later it didn’t.