Docs Menu
Docs Home
/
MongoDB for VS Code
/

Export and Test Queries

On this page

  • Export to Playground

You can use the MongoDB Extension for Github Copilot to export and test your application queries in playgrounds.

Note

The Export Code to Playground feature is only available if you enable MongoDB Extension for Github Copilot.

Use the following steps to test your application code in a playground:

1
2
3

Right-click your selected code to open the options menu. Click MongoDB Copilot Extension > Export Code to Playground.

Screenshot of the export code to playground menu option.
click to enlarge

When you click Export Code to Playground, Visual Studio Code opens a new playground with your selected code in MongoDB shell syntax.

Once you export your code to a playground, you can click on the top right of your window to run your query.

You can also convert your code to a driver language with the Export to Language feature.

Tip

See also:

Back

Export to Language