Visual Studio troubleshooting

If the steps on this page don’t solve your problem, check the list of open issues in the Visual Studio plugin’s project. If an issue matches your problem, update the issue. If no issues match your problem, create a new issue.

For troubleshooting the extension for GitLab Duo Code Suggestions, see Troubleshooting Code Suggestions..

View more logs

More logs are available in the GitLab Extension Output window:

  1. In Visual Studio, on the top bar, go to the Tools > Options menu.
  2. Find the GitLab option, and set Log Level to Debug.
  3. Go to View > Output to open the extension log. In the dropdown list, select GitLab Extension as the log filter.
  4. Verify that the debug log contains similar output:

    14:48:21:344 GitlabProposalSource.GetCodeSuggestionAsync
    14:48:21:344 LsClient.SendTextDocumentCompletionAsync("GitLab.Extension.Test\TestData.cs", 34, 0)
    14:48:21:346 LS(55096): time="2023-07-17T14:48:21-05:00" level=info msg="update context"
    

Extension not loaded on startup

After restarting, the following error is displayed:

SetSite failed for package [VisualStudioPackage]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "Microsoft.VisualStudio.Language.Suggestions.SuggestionServiceBase" but found 0 after applying applicable constraints.
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.Language.Suggestions.SuggestionServiceBase" but found 0 after applying applicable constraints.
  at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
  at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
  at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
  at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
  at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
[...]

To fix this issue, install the IntelliCode component for Visual Studio.

Error: unable to find last release

If you receive this error message, your commits are likely on the main branch of your fork, instead of a feature branch:

buildtag.sh: Error: unable to find last release.

To resolve this issue:

  1. Create a separate feature branch for your changes.
  2. Cherry-pick your commits into your feature branch.
  3. Retry your command.