Pre-General Availability: 2023-05-24
The OPEN EDITORS view provides a listing of each notebook, script,
and MySQL Shell Consoles session that you open. Notebooks and
scripts appear in the scope of a database connection for
simplified navigation. The appearance of the view tree can differ
depending on the number of active connections and tabs you create.
In contrast, console sessions always appear together under the
MySQL Shell Consoles in the view, even if you
opened the session for a specific connection.
On startup, the OPEN EDITORS view contains one persistent
DB Connections entry, also known as the
database (DB) connection browser. The browser includes a tile for
each previously created connection.
Hover your pointer device over the entry in the view and click the
arrow to open a MySQL Shell tab showing the DB connection
browser. The tab includes the Editor toolbar
(with a single
DB Connections entry in its
quick access list) and the
Open New Shell
Console icon next to the quick access list. Closing the tab
also closes all open editors in it and removes those entries from
the view's listing.
The following figure shows the initial OPEN EDITORS view together with a portion of the Editor toolbar.
This section describes the listings and capabilities of the OPEN EDITORS view under these conditions:
The OPEN EDITORS view shows a single open editor (notebook or
script) directly below the persistent
Connections entry. Its name consists of the editor
type followed by the connection name. For example, if you open a
notebook for a connection named
entry in the view is
DB Notebook (Basic).
Click the entry to activate it in the tab or click
Connections to return to the browser. Use the
Msg › Db Editor: setting to select the type
of editor to use for automatic (see
Section 2.3.1, “Settings for DB Notebooks”).
To close a single editor, hover your pointer device over the
entry in the view and click
When you open multiple editors using the same connection, the
view shows each one as a separate entry below the persistent
DB Connections entry. To hide all editors,
click OPEN EDITORS to collapse the view.
Naming rules for multiple editors:
DB Notebook (
OPEN EDITORS shows the initial notebook editor without a number. All subsequent notebook editors are numbered sequentially; for example,
DB Notebook 1 (Basic),
DB Notebook 2 (Basic), and so on.
The listing of entries under OPEN EDITORS changes form and new quick-access capabilities become available at the connection level when you open at least one editor for multiple database connections. All of the editors (and the DB connections browser) become active within a single tab when you click the entry in the view's list.
With multiple connections:
All of the open editors appear under a named connection in the OPEN EDITORS view tree.
Each connection-level node in the view tree maintains an independent list of editors. You can expand or collapse the lists.
Hover your pointer device over a connection-level node to expose notebook and script icons that open a new editor or reactivate the most recently opened editor of that type. Quick-access icons under OPEN EDITORS are equivalent to the icons that appear on each connection tile in the DB connection browser.
It is possible to open a connect to a database in a new tab (see Connection actions). If you elect to open an editor in a separate tab, the OPEN EDITORS view changes to include the tab as a new tree level. Select an editor in this scenario to automatically activate the right extension tab.
With multiple tabs:
The first tab is named
MySQL Shell. Additional tab names include an incremental number, such as
Each new tree level has a single, persistent
All of the open editors appear under a named connection and also indicate the connection name in their entry.
New editors that you add using the DATABASE CONNECTIONS view appear under the view tree associated with the active tab.
Hover your pointer device over a connection-level node to expose notebook and script icons that open a new editor or reactivate the most recently opened editor of that type.
MySQL Shell for VS Code enables you to activate a dedicated work area for opening and managing console sessions in the MySQL Shell Consoles tab. The MySQL Shell Consoles tree under OPEN EDITORS is independent from other tree levels in the view. When you close the tab, the console sessions and the MySQL Shell Consoles tree under OPEN EDITORS also close.
MySQL Shell Consoles contains all of your open sessions. To access a session quickly, click the entry under the OPEN EDITORS or use the drop-down list in the GUI Console toolbar. For more information, see MySQL Shell Consoles.
Open a new session
DB Connectionsunder OPEN EDITORS to open or activate the MySQL Shell tab.
In the tab, navigate to the Open New Shell Console icon on the Editor toolbar. For the icon's location, see the arrow in the following figure.
Click the icon, which opens a new shell session in the MySQL Shell Consoles tab.
New MySQL Shell sessions are not connected to a MySQL server. For connection details, see Connecting MySQL Shell Session.
Close a MySQL Shell session
Navigate to a session under MySQL Shell Console in OPEN EDITORS
X is only
visible when your pointer device hovers over the open session.