You can expand databases to view their collections with their schema and indexes and you can select individual MongoDB Documents to view their JSON. Once attached, you can work with the MongoDB server, managing MongoDB Databases, Collections, and Documents. Note: Make sure your MongoDB server (mongod.exe) is running if you are connecting to a local MongoDB server. You can also enter a connection string, click the 'connect with a connection string' link and paste the connection string. To connect to a MongoDB database, select Add Connection and enter the connection details for the database then Connect, the default is a local MongoDB server at mongodb://127.0.0.1:27017. Select the MongoDB view and you'll see the MongoDB Explorer. Once you've installed the MongoDB for VS Code extension, you'll notice there is a new MongoDB Activity Bar view.
Select the MongoDB for VS Code extension. To install the MongoDB for VS Code extension, open the Extensions view by pressing ⇧⌘X (Windows, Linux Ctrl+Shift+X) and search for 'MongoDB' to filter the results. MongoDB support for VS Code is provided by the MongoDB for VS Code extension. With the MongoDB for VS Code extension, you can create, manage, and query MongoDB databases from within VS Code. Visual Studio Code has great support for working with MongoDB databases, whether your own instance or in Azure with MongoDB Atlas. Configure IntelliSense for cross-compiling.