DocumentDB for VS Code

Release Notes : Back to Release Notes


DocumentDB for VS Code Extension v0.8

We are excited to announce the release of DocumentDB for VS Code Extension v0.8. This is a landmark update, and our biggest release yet, transforming the extension from a GUI browser into a full-featured query development environment for DocumentDB and MongoDB API databases.

This release introduces three major features: context-aware autocompletion in the Collection View, a brand-new Query Playground for writing and running scripts, and a built-in Interactive Shell for ad-hoc exploration. Everything is bundled, requires zero external tools, and works with Entra ID out of the box.

What’s New in v0.8

⭐ Context-Aware Autocompletion in the Collection View

The filter, project, sort, and aggregation editors in the Collection View now understand your data. As you type queries, the editor suggests field names sampled from your collection’s actual schema, operators with type-aware sorting, and values, all with hover documentation for every operator linking to the DocumentDB API docs.

The editor knows your schema and guides you through every keystroke, so you no longer need to look up operator syntax or guess between similar operators like $gte and $gt.

Collection View autocompletion showing true/false suggestions for a boolean field, followed by comparison operators sorted by relevance

In this example, the field additionalInfo.isFamilyFriendly is a boolean. The editor suggests true and false first, followed by comparison operators. Each suggestion shows its category (boolean literal, comparison, projection, element) and the documentation panel at the bottom describes the selected item.

#508, #506, #513, #518

⭐ Query Playground

The Query Playground introduces a .documentdb.js file type that lets you write and run JavaScript scripts against your cluster, directly inside VS Code. Think of it as a notebook-style scratchpad for DocumentDB.

Query Playground showing CodeLens buttons: Run All at the top, and Run, Collection View, and Shell links on each block

The screenshot shows a .documentdb.js file connected to a cluster. The Run All CodeLens at the top runs the entire file, while each block has its own Run button plus shortcuts to open the same query in the Collection View or the Interactive Shell.

No external tools required. The previous scratchpad relied on a locally installed shell executable. That dependency is completely gone. The query runtime is now bundled directly into the extension and reuses the connection you already established when connecting to the cluster. This means it works seamlessly with Azure DocumentDB clusters using Entra ID authentication: no extra configuration, no credential juggling.

Just install the extension and start writing queries. No platform-specific headaches, no version mismatches, no PATH configuration.

#508, #573, #589

⭐ Interactive Shell

A full REPL terminal embedded in VS Code, giving you a shell experience fully integrated with the extension’s connection management. Open it from any cluster, database, or collection node in the tree view, and you’re immediately connected and ready to explore.

Interactive Shell showing tab completion for collection methods and ghost text suggesting a field name from the local schema

The screenshot shows two key features: tab completion suggesting find(), findOne(), and other collection methods after typing db.restaurants.find, and ghost text suggesting the field name reviews after the user typed re in a query. The field suggestion comes from schema information gathered locally as you browse and query your data.

Same zero-install philosophy. The Interactive Shell uses the same bundled runtime as the Query Playground: no external shell executable needed. It works with every connection type the extension supports, including Azure DocumentDB with Entra ID. Install the extension and you have a fully functional shell, regardless of your OS or environment.

#508, #573, #576, #580

⭐ Cross-Feature Navigation

All three query surfaces (Collection View, Query Playground, and Interactive Shell) are linked together with navigation actions, so you can seamlessly move your work between them.

Every collection node in the tree view now shows three inline action buttons for instant access:

Inline action buttons on a collection node: Open Collection View, New Query Playground, Open Interactive Shell

From left to right: Open Collection View, New Query Playground, and Open Interactive Shell. The same actions are available through right-click context menus on database and collection nodes.

1️⃣ Collection View to Playground and Shell

The Collection View toolbar includes Open in Playground and Open in Shell buttons. Clicking either one takes your current find query (filter, project, and sort) and exports it into the target surface. The playground receives a complete db.getCollection('...').find(filter, project).sort(sort) statement ready to run. The shell receives the same expression pre-filled at the prompt so you can edit it before executing.

2️⃣ Shell to Collection View and Playground

After every query result in the Interactive Shell, two clickable links appear: ↗ Collection View [db.collection] and ↗ Query Playground [db.collection]. Clicking either one opens the referenced collection in the corresponding surface, so you can switch from ad-hoc exploration to visual browsing or scripting with a single click.

3️⃣ Playground to Collection View and Shell

Each code block in a Query Playground file shows Collection View and Shell CodeLens links alongside the Run button. These open the same query in the Collection View or launch an Interactive Shell session for the same connection. Some scripts (e.g., loops, aggregations, or multi-statement blocks) may not be convertible to the Collection View.

4️⃣ Clipboard Copy and Paste

The Collection View toolbar includes a Copy button that copies the current find expression to the clipboard in db.getCollection('...').find(filter, project).sort(sort) format. You can paste this text into a playground file, a shell session, or share it with a colleague.

The Collection View also supports Paste: paste a find expression from the clipboard and the extension parses it back into the filter, project, and sort editors.

#589

Key Fixes and Improvements

Dependencies

Changelog

See the full changelog entry for this release: ➡️ CHANGELOG.md#080