Troubleshooting the Amazon Toolkit for Visual Studio - Amazon Toolkit with Amazon Q
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Troubleshooting the Amazon Toolkit for Visual Studio

The following sections contain general troubleshooting information about the Amazon Toolkit for Visual Studio and working with Amazon services from the toolkit.

Note

Installation and set-up-specific troubleshooting information is available in the Troubleshooting installation issues topic, located in this User Guide.

Troubleshooting best practices

The following are recommended best practices when troubleshooting Amazon Toolkit for Visual Studio issues.

  • Repair Visual Studio and restart your system

  • Attempt to recreate your issue or error prior to sending a report.

  • Take detailed notes of each step, setting, and error message during the recreation process.

  • Collect Amazon Toolkit Logs. For a detailed description of how to locate your Amazon Toolkit logs, see the How to locate your Amazon logs procedure, located in this guide topic.

  • Check for open requests, known solutions, or report your unresolved issue in the Amazon Toolkit for Visual Studio Issues section of the Amazon Toolkit for Visual Studio GitHub repository.

Repair Visual Studio and Restart your system
  1. Close all running instances of Visual Studio.

  2. From the Windows start menu, Launch Visual Studio Installer.

  3. Run Repair on the affected installation(s) of Visual Studio. This allows Visual Studio to rebuild its index of installed extensions.

  4. Restart Windows prior to re-launching Visual Studio.

How to locate your Amazon Toolkit logs
  1. From the Visual Studio main menu, expand Extensions.

  2. Choose the Amazon Toolkit to expand the Amazon Toolkit menu, then choose View Toolkit Logs.

  3. When the Amazon Toolkit logs folder opens in your Operating System, sort the files by date and locate any log file that contains information relevant to your current issue.

Viewing and filtering Amazon Q security scans

To view your Amazon Q security scans in Visual Studio, open the Visual Studio Error List by expanding the View heading in the Visual Studio main menu and choosing Error List.

By default, the Visual Studio Error List displays all of the warnings and errors for your code base. To filter your Amazon Q security scan findings from the Visual Studio Error List, create a filter by completing the following procedure.

Note

Amazon Q security scan findings are only visible after security scan has run and detected issues.

Amazon Q security scan findings appear as warnings in Visual Studio. In order to view Amazon Q security scan findings from your Error List, the Warnings option in the Error List heading must be selected.

  1. From the Visual Studio main menu, expand the View heading and choose Error List to open the Error List pane.

  2. From the Error List pane, right-click the header row to open the context menu.

  3. From the context menu, expand Show Columns, then select Tool in the expanded menu.

  4. The Tool column is added to your Error List.

  5. From the Tool column header, select the Filter icon and choose Amazon Q to filter for Amazon Q security scan findings.

The Amazon Toolkit isn't properly installed

Issue:

Within one minute after starting Visual Studio, the Amazon Toolkit for Visual Studio the following messages appear in the output pane and info bar, respectively:

Some Toolkit components could not be initialized. Some functionality may not work during this IDE session.

The Amazon Toolkit is not properly installed.

Solution:

It's possible that updating or installing an extension caused some of Visual Studio's internal cache files to go out-of-sync. The following procedure describes how to have these files rebuilt the next time that you launch Visual Studio.

Note

It's possible that this solution may impact your Visual Studio customizations. After completing this procedure, the Amazon Toolkit extension should be listed as installed and no longer report an error message. If you continue to experience this issue after completing the following steps, please see Issue #452 in the Amazon Toolkit for Visual Studio GitHub repository for additional information.

  1. Close all instances of Visual Studio

  2. From your Operating System, navigate to %localappdata%\Microsoft\VisualStudio

  3. Navigate to the folder containing your Visual Studio 2022 installation. The folder name begins with 17.0_.

  4. Create a backup copy of the file privateregistry.bin and move it to another folder location, then delete the original privateregistry.bin file.

  5. Navigate to the Extensions subfolder.

  6. Create a backup copy of ExtensionMetadata.mpack and move it to another folder location, then delete the original ExtensionMetadata.mpack file.

  7. Launch Visual Studio, to rebuild your privateregistry.bin and ExtensionMetadata.mpack cache files.