|
| 1 | +.. _compass-enable-dev-tools: |
| 2 | + |
| 3 | +====================== |
| 4 | +Toggle Chrome DevTools |
| 5 | +====================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +You can toggle the ``enableDevTools`` option to control user access to Chrome |
| 16 | +DevTools on |compass|. When you enable Chrome Devtools, you can view additional |
| 17 | +diagnostic or debugging information from the |compass-short| interface. |
| 18 | + |
| 19 | +About This Task |
| 20 | +--------------- |
| 21 | + |
| 22 | +By default, |compass-short| disables :guilabel:`Chrome DevTools`. |
| 23 | + |
| 24 | +If you enable any of the following options, you cannot enable the |
| 25 | +:guilabel:`Enable DevTools` setting: |
| 26 | + |
| 27 | +- :guilabel:`Set Read-Only Mode` |
| 28 | +- :guilabel:`Enable MongoDB Shell` |
| 29 | +- :guilabel:`maxTimeMS` |
| 30 | +- :guilabel:`Protect Connection String Secrets` |
| 31 | + |
| 32 | +Procedure |
| 33 | +--------- |
| 34 | + |
| 35 | +You can set the ``enableDevTools`` option in either: |
| 36 | + |
| 37 | +- The |compass-short| :ref:`Settings panel <compass-settings-reference>` |
| 38 | + |
| 39 | +- The :ref:`command line <cli-options>` |
| 40 | + |
| 41 | +- A :ref:`configuration file <config-file>` |
| 42 | + |
| 43 | +|compass-short| Settings Panel |
| 44 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 45 | + |
| 46 | +.. procedure:: |
| 47 | + :style: normal |
| 48 | + |
| 49 | + .. step:: In the |compass-short| top menu bar, click :guilabel:`MongoDB Compass`. |
| 50 | + |
| 51 | + .. figure:: /images/compass/settings-panel-location.png |
| 52 | + :scale: 60% |
| 53 | + :alt: Settings panel location under the MongoDB Compass system menu |
| 54 | + |
| 55 | + Alternatively, you can use keyboard shortcuts to open the |
| 56 | + :guilabel:`Settings` panel: |
| 57 | + |
| 58 | + - Windows / Linux: ``Ctrl`` + ``,`` |
| 59 | + |
| 60 | + - Mac: ``⌘`` + ``,`` |
| 61 | + |
| 62 | + .. step:: In the :guilabel:`MongoDB Compass` menu, click :guilabel:`Settings`. |
| 63 | + |
| 64 | + |compass-short| opens a dialog box where you can configure your |compass| |
| 65 | + settings. |
| 66 | + |
| 67 | + .. step:: Toggle :guilabel:`Enable DevTools`. |
| 68 | + |
| 69 | + .. step:: Click :guilabel:`Save`. |
| 70 | + |
| 71 | +Command Line |
| 72 | +~~~~~~~~~~~~ |
| 73 | + |
| 74 | +The following command starts |compass-short| from the command line and sets |
| 75 | +the ``--enableDevTools`` option: |
| 76 | + |
| 77 | +.. code-block:: sh |
| 78 | + |
| 79 | + <path-to-Compass-executable> --enableDevTools |
| 80 | + |
| 81 | +.. note:: |
| 82 | + |
| 83 | + The name and filepath of the |compass-short| executable depend on your |
| 84 | + operating system. |
| 85 | + |
| 86 | +Configuration File |
| 87 | +~~~~~~~~~~~~~~~~~~ |
| 88 | + |
| 89 | +You can specify the |compass-short| configuration file in either EJSON |
| 90 | +or YAML format. The following configurations set the |
| 91 | +``enableDevTools`` option to ``true``: |
| 92 | + |
| 93 | +EJSON |
| 94 | +````` |
| 95 | + |
| 96 | +.. code-block:: json |
| 97 | + |
| 98 | + { "enableDevTools": true } |
| 99 | + |
| 100 | +YAML |
| 101 | +```` |
| 102 | + |
| 103 | +.. code-block:: yaml |
| 104 | + |
| 105 | + enableDevTools: true |
| 106 | + |
| 107 | +Learn More |
| 108 | +---------- |
| 109 | + |
| 110 | +To learn more about the |compass| configuration file, see |
| 111 | +:ref:`config-file`. |
0 commit comments