VSC Extension : MongoDB integration into the Terminal options?


This is regarding VSC extension and whether it is possible to add the MongoDB Shell to the terminal options along side (Powershell, CMD and Git Bash for example), in such a way that if I am currently connected to a MongoDB database, it would allow me instantly duplicate a connection.

Much in the same way the MongoDB: Launch MongoDB Shell, fires off a: -


Or even better, if I use the split option on a currently created connection, it would duplicate that connection. At the moment if I use WIN CTRL-SHIFT-5, it spawns off a powershell session, which isn’t what I would like.

If it’s possible already, then let me know. I have tried this within the integrated terminal settings for windows JSON: -

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

No joy, it comes back with a “The terminal process “mongo ‘$Env:MDB_CONNECTION_STRING’” failed to launch (exit code: 1).”

Also it would be useful if $ENV:MDB_CONNECTION_STRING was set/reset when a connection was made to the MongoDB database, and not when the MongoDB: Launch MongoDB Shell was instigated.


PS - How is the VSC extension coming along, it’s been a been a bit quiet on the enhancements lately.

PPS - Where do we put feature requests nowadays?

Hi @NeilM,

thank you for the feedback on this. I recommend adding this feature request to our feedback portal: https://feedback.mongodb.com/forums/929236-mongodb-for-vs-code.

There is, however a workaround for what you are trying to do. It sounds like your goal is to quickly open a new shell instance connected to the server/cluster the extension is currently connected to. A command for that is available in the command palette:
That means you can assign a keyboard shortcut to it and every time you use that shortcut, you’ll get a new shell instance.

I am curious: what do you do with multiple shell instances connected to the same cluster?

And yes, you are right. We have been pretty quiet on enhancements. We will probably do a bugfix release soon and probably a bigger one in a month or so.

1 Like

The issue with the Launch new shell, is that it creates a new shell completely, not a split. I ideally don’t want to be going back and forth between integrated terminal views.

The reason why.

Sometimes I will want to look at data, while on another terminal session refine a query, or I want to check that the playground has given me the correct results, which it doesn’t always. Sometimes comes back with [ ] btw.

If I have the mongodb connections tab open, then I lose a right side (CTRL-B), and at the moment the schema analyze view in connections, isn’t as good as the compass one.

If I am at a terminal level, then I can spawn multiple terminal sessions quickly all nicely spaced. Looking at data via the connections tab (So not always a good space trade off), and fills up the screen with tabs. See screen shot.

I suppose it’s all about having options on how to work (The view below is on a 42" monitor so it’s a lot more readable than it seems).

Oh by the way this link


  1. Can we please make the box where we enter the suggestion text box re-sizable, so I can read the whole of the text, there didn’t seem to be an option to resize in chrome.

  2. Would it be possible to allow add images (about a 1000kb), since I had to cross post back to this page to link in a screenshot.

  3. Why was suggestions/features moved away from Github, since it seems to be re-inventing the wheel with that new page?

Thank you for the feedback.

It wasn’t really moved from Github. At MongoDB, we use https://feedback.mongodb.com as a centralized repository of suggestions for all products and it easier for me if feature requests are submitted through that portal.

We know Github is friendlier but that portal give us a way to track things cross-product and cross-customer. What we’d often do when we get feature requests through Github issues is to move them over to the feedback portal, but that’s a manual process so they don’t always get moved over. We are looking to improve that process though.

Unfortunately, the feedback portal uses a 3rd party solution so the degree of customizability is limited.

It must have been free or a bolt on to another product. :slight_smile: Some customer service portal, I’d imagine

I will just knock up suggestions in a text editor instead and paste it in the box going forward, though the limit on images is a bit of a challenge.

Do you know what the restrictions are, since it may be worth mentioning them on the page e.g. size, image type, documents types allowed etc.