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. Set a default connection or auto detect a running MongoDB session

    Automatically set up a connection via the MongoDB Extension instead of pasting the connection string manually every time.

    Either by
    1. detecting a running mongo session
    2. Loading default connections, from a place on the system

    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  ·  Connectivity  ·  Flag idea as inappropriate…  ·  Admin →
  2. Connection based "theming"

    Add the ability to color code playground tab and/or editor's background color in the playground based on the connection that is active.

    Eg: default background for my localhost connection and a more colorful one for staging environment or production ones even.

    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 →
  3. Use Ctr-Enter to execute instuction where the cursor is.

    Currently, is kind of tedius to execute a targeted line. Other editors accept Ctl-Enter to execute the line, which is very convenient.

    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

    4 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
  4. Specify default database in Advanced Connection Settings form

    The Create New Connection using the Advanced Connection Settings form does not provide a place to specify a default database. I'm specifically interested in this so I like running selected lines and it'd be a way to not include 'use(<db>)' with every query.

    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 →
  5. 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  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  6. 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

    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  ·  Flag idea as inappropriate…  ·  Admin →
  7. 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.

    7 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 →
  8. 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:MDBCONNECTIONSTRING"]
    }

    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…

    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 →
  9. 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 →
  10. 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.

    5 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

    4 comments  ·  Flag idea as inappropriate…  ·  Admin →
  11. Copy collection schema

    Detailed Description
    Ability to copy collection schema, Export schema to a typescript file,

    Context
    So that we can use it (schema interface) for typescript. Basically It will infer types about collection.

    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  ·  Schema  ·  Flag idea as inappropriate…  ·  Admin →
  12. 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 →
  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.

    27 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

    1 comment  ·  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. "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.

    5 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

    1 comment  ·  View/Edit Documents  ·  Flag idea as inappropriate…  ·  Admin →
  17. Add syntax checking for JS and JSON

    The editor does not sense and redline JSON syntax errors. To work around this, I switch the file association to “JavaScript” whenever I am seriously editing a pipeline. Then I switch the file association back to “MongoDB” just before testing/executing the pipeline. This is inconvenient.

    Original request.

    0 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

    under review  ·  0 comments  ·  Playground  ·  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. 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.

    0 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 →
  20. 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

    8 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

    3 comments  ·  Playground  ·  Flag idea as inappropriate…  ·  Admin →
← Previous 1
  • Don't see your idea?

Feedback and Knowledge Base