Chiran Sachintha
Chiran Sachintha

Reputation: 124

Issue with VSCode extension - Ballerina SDK version mismatch

I am encountering an issue with the Ballerina extension in Visual Studio Code. Initially, I was facing a problem where the Ballerina SDK version was not being recognized in my VSCode editor, and an error indicated that the Ballerina version did not match. To resolve this, I updated the Ballerina SDK to the latest version.

Even after the update, the problem didn't go away. Then I removed both the Ballerina SDK and the VSCode extension, and then installed them again. Unfortunately, the issue is still there, and now I'm seeing a different error message: "Unknown error - could not load extension." Any suggestions to solve this problem?

Upvotes: 1

Views: 49

Answers (1)

Chiran Sachintha
Chiran Sachintha

Reputation: 124

To configure the Ballerina extension, we need to set the ballerina.home path in the extension settings. To do this, follow these steps:

  1. Go to the Ballerina extension settings.
  2. Add the path to your Ballerina home directory.

For example, if you are using Linux and have installed Ballerina using the standard Linux installer, your Ballerina home configuration path would /usr/lib/ballerina/distributions/ballerina-2201.8.0.

And also check whether the ELanguage Server Debug option is selected (checked)

If it is selected, try the following:

  1. Uncheck the Language Server Debug option.
  2. Reload Visual Studio Code.

Upvotes: 1

Related Questions