Azure Cosmos DB for VS CodeConnect to Azure Cosmos DB for NoSQL from VS Code to explore accounts, manage databases and containers, edit items, and run queries without leaving your editor. Work with Azure accounts, connection strings, or the local Azure Cosmos DB Emulator. Install from the Visual Studio Marketplace | Read the documentation | Report an issue
Get Started
Features
Azure Cosmos DB ExplorerThe Azure Cosmos DB Explorer helps you find, view, and manage your Azure Cosmos DB databases.
Account Overview DashboardThe Account Overview Dashboard gives you an at-a-glance view of a Cosmos DB account: inventory, provisioned vs. normalized RU consumption, partition health, active alerts, and recommendations. Open Account Overview → Overview from an account node in the Explorer. The dashboard has three tabs: Monitoring, Databases and Containers, and Advisories. The Account Overview submenu also provides shortcuts to each monitoring metric and to Advisories. Metric shortcuts select the corresponding card and focus its chart in the existing Monitoring tab, preserving the time range and database scope; they do not open separate dashboards. Expand Account details for View Cost, View JSON, and Additional account properties. View Cost opens Azure Portal Cost Analysis scoped to the account in its Azure cloud. View JSON retrieves the account resource from Azure Resource Manager and opens formatted JSON in VS Code without requesting keys or connection strings. The action bar reuses the existing database/container creation wizards and account deletion confirmation. Add container uses the database selected in the header; with All databases, it first asks you to choose a database within this account, including empty databases. These creation/deletion actions require the corresponding Azure write permissions. Try Data Modeler opens the modeler for this account; it requires AI features enabled and available GitHub Copilot models. While Add database or Add container runs its native VS Code wizard, Overview is dimmed and unavailable to mouse and keyboard interaction. Cancel in the wizard to return without changes. After successful creation, Overview unlocks once inventory refresh finishes. Failures appear in a Fluent error message bar and are announced assertively to screen readers without moving focus. Overview loads on opening and does not auto-refresh, including when you return to the editor. Refresh reloads every section, including inventory metrics, the selected container's partition telemetry, alerts and advisories. Changing a filter reloads only the data that depends on it. The header shows the local date and time when the displayed metric charts were generated, to the left of the filters; this is not the freshness timestamp for every section or the latest Azure metric sample. The Refresh button shows a spinner for an explicit Refresh or a metric time/database-scope change, not for the initial load. Its label stays Refresh, with no separate updating text. Refresh and the header's database/time-range selectors are unavailable while data requests finish, including initial loading, so another filter change cannot overlap the current load. They become available again after completion or failure, retaining the selected values. Each section retains its own loading state. User-requested updates are announced to screen readers. Sections read Azure resource metadata, Monitor metrics/alerts, Advisor recommendations and configured diagnostic logs. When a source is unavailable, its section shows an explicit state rather than treating missing data as zero:
Required Azure rolesData is fetched with your Azure credentials. The table lists typical read roles; equivalent custom permissions and assignment scope also determine access. A permission failure is shown for the affected source while independent sections remain usable.
Tier-2 derived advisories (cross-partition query fan-out, shard-key misalignment, uncontrolled ingestion, and shared-throughput starvation) additionally read the account's resource-specific Derived advisory explanations, suggested actions and threshold references highlight numeric evidence and its units on a subtle theme-aware background. Their underlying strings remain readable plain text: paired backticks mark a highlighted phrase (for example, Learn more about assigning roles in Azure role-based access control. For explanations of health, charts, alerts and everyday use, read the Account Overview guide. When implementing or changing Account Overview calculations, refresh behavior, actions or diagnostics, use the implementation specification for exact rules, rationale and regression requirements. Data ModelerData Modeler (Preview) helps you choose partition keys for Azure Cosmos DB for NoSQL using GitHub Copilot.
The
Work is saved locally per account so you can resume later; saved sessions expire 30 days after their last save. To permanently clear local Data Modeler data for every account, run Cosmos DB: Delete All Data Modeler Data from the Command Palette and confirm. This closes all Data Modeler tabs and removes saved sessions, including legacy data. It does not delete deployed databases or containers, saved container schemas, or query history. See modeling details and the telemetry inventory for more. Query EditorThe Query Editor provides a focused workspace for writing, running, and tuning Azure Cosmos DB for NoSQL queries.
Keyboard ShortcutsThe Azure Cosmos DB extension supports various keyboard shortcuts to improve your productivity when working with queries and documents. For a complete list of keyboard shortcuts, see Keyboard Shortcuts. AI-Powered Query Assistance (GitHub Copilot)The extension integrates with GitHub Copilot to help you write, edit, and understand Cosmos DB NoSQL queries using natural language.
For more details, see the AI Chat documentation. Migration Assistant (Preview)The Migration Assistant uses the Migration projects started before the Skill was introduced can still be opened and inspected. Their existing artifacts need evidence validation before their phases can be treated as complete in the Skill workflow. Use Import into Azure Cosmos DBThe extension allows you to import documents into Azure Cosmos DB.
Attach to the Azure Cosmos DB EmulatorAttach the Azure Cosmos DB Emulator to work with a local instance of Azure Cosmos DB for development and testing purposes.
For local setup instructions and connection details, see Azure Cosmos DB Emulator. Corporate proxiesNormal Cosmos DB for NoSQL connections delegate proxy handling to VS Code. See VS Code network configuration for proxy, authentication, and certificate guidance. Emulator exception: local Known Issues
TelemetryData Modeler template downloads report a VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the Data Collection. The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=521839. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. License |


