Skip to content

Commit 03da9df

Browse files
(DOCSP-11480): Connect to deployment from playground
1 parent 3dfe633 commit 03da9df

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

source/connect.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,7 @@ Remove a Connection
204204
:tabid: mdb-view
205205

206206
.. include:: /includes/steps/remove-connection-mdb-view.rst
207+
208+
.. seealso::
209+
210+
:ref:`playground-connect-to-deployment`
Loading

source/playgrounds.txt

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,45 @@ Run a Playground
5252
To run a playground, click the :guilabel:`Play Button` in VS Code's
5353
top navigation bar.
5454

55+
.. _playground-connect-to-deployment:
56+
57+
Connect to a Deployment to Run a Playground
58+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
If |vsce| is not connected to a MongoDB deployment, you can
61+
specify a connection string for the deployment you want to run your
62+
playground against.
63+
64+
If you have a playground file open in |vscode-short| and do not have
65+
an active connection, |vsce| displays
66+
:guilabel:`Click here to add connection` at the top of your playground.
67+
68+
.. figure:: /images/vsce-playground-add-connection-btn.png
69+
:figwidth: 700px
70+
:alt: Button to add connection from playground
71+
72+
1. Click this button to open the connection string dialog.
73+
74+
#. Enter the
75+
:manual:`connection string </reference/connection-string/>` for the
76+
deployment you want to run this playground against.
77+
78+
#. Press :guilabel:`Enter`.
79+
80+
#. Run your playground.
81+
82+
.. note::
83+
84+
When you connect to a deployment through the playground connection
85+
dialog, that connection is added to your |vsce|
86+
:guilabel:`Connections` list.
87+
5588
Run Selected Lines of a Playground
5689
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5790

5891
If you select a section of your playground, you may optionally run only
59-
the selected portion. Your selection can consist of a single line or multiple lines.
92+
the selected portion. You may run either a single line or multiple lines
93+
of your playground.
6094

6195
|vsce| shows the :guilabel:`Run Selected Lines from Playground` button
6296
immediately below your selected section. Click this button to test and

0 commit comments

Comments
 (0)