ADS: Demo Mode Extension

Through out the year I present a lot of sessions on SQL Server and related technologies. These take place at user groups(9 in 2019), SQL Saturdays(14 in 2019), training sessions at work and teaching the SQL Server certification courses from Microsoft.  With these many different presentations there are differences in the screen sizes and room sizes.

When presenting, setting the demos up in a way that will allow all attendees to easily see the code can be a bit of a challenge sometimes. To accomplish this presenters have several tools available to them.

Tools commonly used

      • ZoomIt – This is a free third party tool that I have been using for a few years
      • Windows 10 Zoom feature
      • Increase the font of the code window in SQL Server Management Studio or Azure Data Studio
      • Use the Demo Mode extension in Azure Data Studio
      • A number of other tools

While I would love to list the pros and cons of each, that really isn’t the focus of this blog post.  Recently an extension for Azure Data Studio was released by Drew Skwiers-Koballa that I think is a great addition to the list of available tools.

The first thing to do is to install the extension.  To do this, you will need to download the .vsix file.  To find the extension type the word “Demo” in the extension search box.  To open Extensions, there is a menu items under the View menu.

To download the file you will need to click the install button in Azure Data Studio when looking at the documentation of the extension.

When you download the file, place it in a location that will be secure and the file will not be overwritten.  Once saved, to install it go to the “Install Extension .VSIX package” menu item under the file menu.  You will need to restart Azure Data Studio when the install is complete.  Please remember, this is extension is still marked as being a Preview.  Given that, things could change with the next release.

Now that it is installed, let’s go over what it does.  This part is pretty simple, when enabled the font in the query window will be come larger and when disabled the font will become the original size.

The two images below show the font with Demo Mode enabled and disabled.  The first image is disabled, while the second has Demo Mode enabled.

When Demo Mode is enabled the only thing on the screen that will change is the font size of the query.  Everything else will remain the same size.

To enable\disable the extension you will need to do one of two things.  First, you can use the Command Pallett.  Type “Demo Mode” into the search box.  Two options we be returned, Enable and Disable Demo Mode.  This can be seen in the image below.

The second option is to click the Enable\Disable Demo Mode button that is located in the lower left corner of Azure Data Studio.  I personally like this option because it is very easy to use.  By default neither of these options has a keyboard short cut assigned to it.  However, under File–>Preferences–>Keyboard Shortcuts, you can add the short cut key or key combination that will work for you.

You may be asking yourself where does the extension get the font sizes to use.  When the Demo Mode extension is installed, three settings are added.  Two of these settings identifies the font size to use when the extension is enabled or disabled.  See the image below.

The Demomode: Demo Font Size setting is what font size ADS will use when the Demo Mode extension is enabled.  As expected, you would want this to be bigger than the Original Font Size, which is just below it.  This represents the font size with the extension is disabled.

What if the Original Font Size is a different value than Editor Font size?  Well, this does not appear to be a situation that can happen.    When I changed the Editor:  Font Size setting like below, the Demo Mode: Original Font Size will change to this new setting.

The third option will allow Azure Data Studio to send confidential about the usage of the extension.  As you can see with the presence of a checkbox, this is something you can option out of if you like.  The documentation can be found here. This is what the documentation actually states:

“enables anonymous usage data to be sent to an online service”

The documentation also goes on to state the following:

“The extension telemetry sends usage data anonymously to an Application Insights instance. Machine information, such as operating system or general location, may be shared with the general public in aggregate. Your information will not be sold to any third parties. For more on the collection of telemtry in this extension, read more here or ask questions here”

Please read through these very carefully to determine of this is something you would like to opt out of.

Earlier I completed a blog post on how to open the Settings in json rather than the UI.  Here is the link to that blog post.  In the settings.json file, the Demo Mode extension will look like below.

I like this new extension and plan on utilizing it for all my sessions that use Azure Data Studio.  For the documantion and additional information you can go to the documentation. I would like to point out that while this extension has a target audience of people who do presentations, it also has another audience.  Sometimes, I just need the font to be slightly bigger for a temporary reason, like I am tired and the eyes just can’t focus as well as normal.  I can use this extension to make that much easier.

For more information about  Drew, the developer of this extension you can go to his blog, https://www.drewsk.tech/.  Also he has a nice presentation on developing extensions.  If you get a chance to hear this at your local user group or SQL Saturday, make sure you go, it is a very nice session!

Thanks for visiting my blog!!!

 

ADS: Settings Editor

When working with the Settings in Azure Data Studio, you have a few options on how you will see them.  The two options available at this point are the “user interface” and “JSON”.  While it is usually easier to modify the settings using the UI, you might prefer to use the json instead.  I feel that anyone that uses Azure Data Studio on a regular basis should learn the basics of JSON.

These are my reasons why I think we should learn the basics of JSON.

      • Some settings must be changed in JSON
      • One of the export options for a result set is JSON

The first reason is where the focus of this post is.  Many settings can easily be modified using the user interface, however not all can.

The settings can be found under the File menu or you can use the keyboard shortcut of “Ctrl + ,”.  Under the File menu is you will find Preferences.  It is in the pop out memu that the Setting menu item can be found.

Once in settings you will quickly see that there are many settings.  Most of these you will not have a need to change, but it is good to know what can be changed. Once in the Settings, the user interface is quite easy to navigate around. You can even search for specific key words on the top.

As you scroll through the various settings you might notice that not all the options can be changed in the UI.  Some must be changed using the JSON file.

The settings.json file can be found in this location.

C:\Users\<<UserProfileName>>\AppData\Roaming\azuredatastudio\User

Notice that “azuredatastudio” does not have any spaces.  When you navigate to this location “C:\Users\<<UserProfileName>>\AppData\Roaming” you may see two folders, both named Azure Data Studio.  One will have spaces, the other will not.  The settings.json file is found in the folder without spaces in the name.

 

Now that we know the location of the settings.json file, let’s return to the editor.  As mentioned earlier, the settings can be changed in two places, the editor UI and the JSON file.

This is what you will see if the setting can be modified in the UI.  Depending on the setting, you may see a dropdown box, a text box or a check box.

If you see something like what is in the green box below, the setting must be modified in using the settings.json file.

When using the UI, you have both options.  However, there is an setting that will allow you to use only the settings.json file.  This setting can be found in the Workbench group.

The dropdown box will have two options, ui and json.  When set to json, the settings.json file will open when you attempt to look at the settings.  Keep in mind, when you change this to json, you will not get a warning and it will be saved automatically by default.

With it set to json, as expected the settings.json file will open instead of the user interface.

You might be asking, how can I change it back?  This is quite simple.  Look for the “workbench.settings.editor” setting and change it back to “ui”.  Remember there are only two option, “ui” and “json”.  Make sure to keep the quotes.  As you can see in the above image, it is on line 209 on my instance, although will probably be different for your instance of ADS.

When in the json file, if you float your mouse pointer over one of the settings a pop up will appear that may provide a bit of information about the setting.  Something like what is in the red box below.

While I prefer to use the ui, it is nice to have this option if I wanted to change.

If you are not using Azure Data Studio on a regular basis, my suggestion is to take a look at it.  The price is right, it is free and has many great features.

Thanks for visiting my blog!!