MongoDB for VS Code

MongoDB for VS Code lets you easily work with MongoDB directly from your VS Code environment. Using the MongoDB extension, you can:

  • Connect to a MongoDB instance or cluster
  • Navigate your databases and collections
  • Prototype queries and aggregations

You can install the MongoDB extension from inside of VS Code via the VS Code Extension Marketplace. Help us improve the MongoDB for VS Code by posting your ideas and suggestions for improvements.


To report bugs, please use our VSCODE JIRA project.

  1. Improvements to Terminal Shell (split)

    It would be nice that When the VSC extension is added, it creates an entry in the integrated terminal settings (terminal.integrated.automated.windows/mac) like: -

    "MongoDB": {

            "path": "mongo",
    
    "args": ["$Env:MDB_CONNECTION_STRING"]

    }

    Which I can't currently get to work.

    So that when I split a currently connected MongoDB intergrated terminal session, it spawns another mongo session with the same connection parameters at the same level.

    Also at the moment $Env:MDBCONNECTIONSTRING only seems to be set when the MongoDB:Launch MongoDB Shell is run, not when a connection is made to the a MongoDB server (connections).

    At the moment, if the user…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    3 comments  ·  Shell  ·  Flag idea as inappropriate…  ·  Admin →
  2. Ability to delete individual records in a collection

    Ability to delete individual records in a collection either using the "backspace" or the menu (delete record). Also, an "empty this collection" would help.

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  3. Integration of an Aggregation/Query Formater

    Bad formatting of queries are a pain. Queries and specially Aggregation Pipelines can get quickly unreadable, unmaintaibable or miss understandable. To avoid this I'd like to ask for a code formater. There will be always a discussion of a good and better style, but at one point a suggestion is better than nothing. Here https://developer.mongodb.com/community/forums/t/what-are-some-of-the-biggest-mistakes-people-make-in-aggregation-pipelines/11803/4 you can find a brief discussion which triggered this request.
    To get a kind of flexible the integration of a project wide config file might be interesting. The editorconfig https://editorconfig.org/ is supported by VSCode, simple text file, just check it with the code and it…

    9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  4. "Table View" of Documents

    As some others tools have, a way to view all documents from a collection in a table format with columns and lines. An 'click on header for sort' is well desirable.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  5. make and export button and a delete collection item

    make button to export collection to xls or any other spreadsheet file. And also make a button to remove collection items

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  6. Linting/Validation support for query language

    It would be nice if MongoDB for VS Code had a built-in functionality to verify query syntax, best practices, etc.

    Conceptually, this would work similarly to how ESLINT works for JavaScript.

    11 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Other  ·  Flag idea as inappropriate…  ·  Admin →
  7. Handle 64bit numbers correctly

    Javascript doesn't support 64bit internally, so if I try in Chrome/console: x = 285870311191169181, it becomes 285870311191169180, and the same thing happens in VS Code.
    The solution would be to return a NumberLong("285870311191169181") text result.
    In fact, it seems to be an issue in Compass as well... but it works in mongo shell.
    Check the screenshot.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  8. We do not have to repeat use('db') every time

    After executing use('db') we don't need to include the command with each run, especially when we want to run the selected line.

    At present, if I run some selected lines to run from play ground it doesn't works if the lines doesn't includes the use('db') command.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  9. Formatting support for mongodb playground files.

    There's no way that I can find to format the code in a .mongodb playground file.

    At present, I need to manually change the file suffix to js, then use a hot-key to run prettier, then rename it back.

    If there is a better way, I'd love to know it!

    Thanks,

    Kim

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    2 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  10. Please let the toolkit refresh database status more freequently

    Please let the toolkit refresh database status more freequently.
    You guys can having a try,to use playground create a new database,and then the database status doesnt appear the new database at all.Just need reloading VS Code and then i could found that there was a new database.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Connectivity  ·  Flag idea as inappropriate…  ·  Admin →
  11. Aggregation Pipeline or MapReduce

    Be able to create aggregation pipeline or MapReduce with IntelliSense.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  12. Write query with IntelliSense

    The ability to write queries, with IntelliSense and see the results as JSON or Tables. The query language can be in MQL or SQL. The results can be exported as json, csv or excel.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  13. Code linting when you save a .mongodb file

    It would be nice to have the code cleaned up when you save a .mongodb file

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  14. Show UUID fields as UUID in document editor

    I have a collection with documents containing UUID fields (standard, not legacy). When I browse those documents in the extension, they are shown like this:

    {
    "_id": "5e58eae46015f74c61dd6af0",

    "my_uuid": {
    
    "$binary": {
    "base64": "ILGr2eKZSmqkQX1OZsoICQ==",
    "subType": "04"
    }
    }

    }

    I would have expected them to be shown as:

    {
    "id": "5e58eae46015f74c61dd6af0",
    "my
    uuid": UUID("20b1abd9-e299-4a6a-a441-7d4e66ca0809")
    }

    Robot 3T (for example) does this well. I think it would greatly help to read such values.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  15. filter by database/collection name

    would be nice to be able to filter by database/collection name in the connections panel, similar to what is found in MongoDB Compass.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  16. Open documents in the same tab

    Every time I want to check a doc, It opens it in a new tab Which makes it difficult to navigate across the workspace. I would recommend open docs in the same tab and maybe device some mechanism to open the docs in a new tab if the user wants to compare two or more of them.

    13 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  17. Ability to edit connections

    Ability to edit existing connections.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Connectivity  ·  Flag idea as inappropriate…  ·  Admin →
  18. New Playground Result tab for each query

    When two playgrounds are run at once (e.g. two aggregations), the result of one overwrites the result of the other rather than opening a new 'Playground Result' tab.

    The desired behaviour is for a new Playground Result tab to be opened per run (preferably numbered 'Playground Result 1', 'Playground Result 2', etc.

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  19. Tree collapse/expand in the connections panel

    After opening a few options of the tree sometimes I want to collapse all and explore a completely different path, having the option to expand/collapse all would be neat!

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  20. Improvements to Terminal Shell

    When a connection is setup, allow additional configuration for the Terminal Shell


    1. Allow a colour scheme for the shell, so that the user can set background/text colours, so red for LIVE. Very useful when on LIVE/TEST/DEV etc. A clear indication of where you are.


    2. Set a friendly name or full connection string for additional line in the terminal shell, so you can see where you are at all times, where you are connected to.


    You can have multiple shells connected at anyone time and again it helps to see what that shell is connected to.

    You only have to drop…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    1 comment  ·  Connectivity  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base