> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshoot Astro for VS Code

> Resolve common problems with Astro for VS Code, including a missing Astro CLI, sign-in failures, empty views, and chat errors.

<Info>
  **Labs**

  This feature is in [Labs](/docs/astro/feature-previews).
</Info>

This document describes how to resolve common problems with Astro for VS Code. If your problem isn't listed, see [Get more help](#get-more-help).

## The extension can't find the Astro CLI

A view or the chat reports that it can't find `astro`.

An editor that you start from the Dock, Finder, or Start menu doesn't inherit your shell's `PATH`, so it can't find an `astro` binary installed in a folder such as `/opt/homebrew/bin`.

1. In a terminal, run the following command:

   ```bash theme={null}
   which astro
   ```

2. In your editor's settings, set `astroOtto.astroPath` to the path that the command returns.

If the command returns nothing, [install the Astro CLI](/docs/cli/v1.46/install-cli).

## Sign-in doesn't finish

You click **Log in to Astro**, but the browser doesn't open, or the **Profile** view doesn't show your account.

* If another `astro login` command is running in a terminal or another editor window, finish or stop it, then try again. Only one sign-in can wait for the browser at a time. If the port it needs is in use, the extension shows the port number.
* If the browser doesn't open, the extension shows the sign-in link. Click **Copy link** and open the link in your browser.
* If the Astro CLI doesn't return a sign-in link, the extension runs `astro login` in a terminal instead. Follow the prompts in the terminal.
* Confirm that you're signing in to the correct environment. See [The Deployments view is empty or shows the wrong Workspace](#the-deployments-view-is-empty-or-shows-the-wrong-workspace).

## The Deployments view is empty or shows the wrong Workspace

* Check the **Profile** view. It shows the environment, Organization, and Workspace that the **Deployments** view reads. Click the **Organization** or **Workspace** row to switch.
* If the environment is wrong, check the `astroOtto.domain` setting. When it's set, the extension uses that environment regardless of the Astro CLI's context.
* The views refresh when the Astro CLI configuration changes, such as after `astro workspace switch` in a terminal. If the view still shows the wrong Workspace, click the refresh icon in the view's title bar.

## A Deployment can't be checked

* **No permission to read this Deployment's Airflow**: Your role can't read the Deployment's Dags. Ask a Workspace Admin for a [Workspace or Deployment role](/docs/astro/user-permissions) that can. The view checks again when you return to the editor window or refresh the view.
* **Airflow is not serving yet**: The Deployment is starting or updating. Wait for the row to clear.
* **Could not check for failures**: Hover over the row to see the error, then refresh the view.

## The Local view doesn't show my project

The **Local** view looks for projects only in the folders open in your window. It doesn't search subfolders.

Open the project folder that contains `.astro/config.yaml`, instead of a parent folder. To work on several projects, add each one to the window with **File** > **Add Folder to Workspace**.

## A local project is stuck on starting

* Check the terminal that runs the start command. The first standalone start installs Airflow and can take several minutes. If the start failed, the terminal shows why.
* Right-click the project and choose **Stop Local Airflow**, then start the project again.
* If the project still doesn't start, right-click it and choose **Kill Local Airflow and Delete Its Data**, then start it again. This deletes the project's local metadata database and logs.

## A local project says its project folder is gone

The project folder was deleted or moved before Airflow stopped, so its process still runs. The extension can't stop the process, because `astro dev stop` must run in the project folder.

Find the process ID in the row's tooltip, then stop the process from a terminal.

## Python can't resolve Airflow imports

Your editor underlines imports such as `from airflow.sdk import …` in your Dag files.

Right-click the project in the **Local** view and choose **Use This Project's Airflow Environment for Python**. This command requires Microsoft's Python extension and a `.venv` folder in the project, which `astro dev start --standalone` creates.

## Otto doesn't respond

* If the chat says that you must sign in, sign in from the **Profile** view and try again. Otto uses your Astro session.
* If the chat says that the model provider refused to answer, it shows the provider's reason. Rephrase your request or choose another model.
* If Otto doesn't respond for a long time, click **Stop** and send your message again. Otto keeps the conversation.

## Get more help

* Check the **Astro** output channel for details. Run **Output: Show Output Channels** from the Command Palette and choose **Astro**.
* Report a problem in the [astro-vscode-extension](https://github.com/astronomer/astro-vscode-extension/issues) repository. Include the contents of the **Astro** output channel.
