Visual Studio Code Extension Samples

SQL Management Studio can be... a bit of a beast. Let's see how to use Visual Code Studio instead in order to write SQL queries.

Join the DZone community and get the full member experience.

Join For Free

Visual Studio and VS Code extensions.Add-ons that can customize the Visual Studio experience.Add your own items to menus and toolbars.Extend existing tool windows or create your own.Customize IntelliSense for a language or add support for a new one.Create new project templates. To install, search extensions in Visual Studio Code. Once the ArcGIS AppStudio extension is returned, click Install. In the Extension panel of Visual Studio Code you can do the following: Disable or uninstall the extension. Update the extension. Learn what's new to the extension.

Extension

Writing SQL queries is typically done with SQL Management Studio (SSMS). However, this tool is a bit of a beast, so let's look at how you could use Visual Studio Code instead.

  • Visual Studio extension development. Create add-ons and extensions for Visual Studio, including new commands, code analyzers, and tool windows. Add the SDKs and tools you need to create new commands, code analyzers, tool windows, and language services using C#. Then, share your extension with the community in the Visual Studio.
  • Browse code samples. Get started with Microsoft developer tools and technologies. Explore our samples and discover the things you can build.
  • Visual Studio Code is undoubtedly one of the best lightweight Code Editor to use in 2019. Microsoft released it in 2015 as an open-source project, and since then it is backed by tremendous community support. It has built-in Git support, an advanced debugger, syntax highlighting, snippets, code refactoring, smart auto-completion, a powerful search tool.

Visual Studio Code is a free text editor — but it is so much more than just a text editor. Let's see how. (By the way, VS Code can be downloaded from here.)

To work with SQL Server, download the MS SQL extension. Press CTRL + SHIFT + P, select Install Extension, and type mssql.

Intellisense in Visual Studio Code is brilliant — better than SSMS. Let's look at how to get it all set up.

Create a new file and set the language type to SQL (press CTRL + K + M).

Studio

Open the command palette with CTRL + SHIFT + P and type SQL to show the MS SQL commands. Select the Connect command.

Then, select Create Connection Profile. This creates a profile to connect to your SQL Server. Follow the prompts to get it all set up.

Look in the bottom right corner of the status bar and you should see that you are connected!

Now, if you type sql, you will see a long list of SQL code snippets that you can use:

Visual

Choose a snippet to create and edit it as required. When you are happy, press CTRL + SHIFT + E to execute.

This is basically all there is to it! However, this is an incredibly powerful way of working; the Intellisense instantly tells you what database objects you can use in your query, and there is a wealth of different snippets you can use.

Visual Studio Code Extension Samples Free

When returning data, you get a similar view to SSMS, but you can save as Excel, CSV, or JSON.

SSMS is a very graphical way of doing things. You can double-click a table and see its columns or indexes. VS Code relies on T-SQL commands, but you have access to exactly the same information.

For more information about VS Code and the MS SQL extension, check out this documentation.

Visual Studio Code Extension Samples
database,sql,visual studio,ms sql,ssms

Published at DZone with permission of Simon Foster, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Install Salesforce Extensions for Visual Studio Code

Visual Studio Code is the go-to code editor for Salesforce developers. It's free, open-source, and available for Windows, Linux, and macOS. This editor has easy-to-install extensions for syntax highlighting, code completion, and more.

In this project, we install Visual Studio Code and the recommended Salesforce Extension Pack.

Visual Studio Sample Codes

  1. Download and install the latest version of Visual Studio Code for your operating system. If you already have Visual Studio Code installed, there’s no need to reinstall it.
  2. Launch Visual Studio Code.
  3. On the left toolbar, click the Extensions icon .
  4. Search for Salesforce Extension Pack and click Install.

Note

Some features, particularly Apex support, in Salesforce Extensions for Visual Studio Code depend on the Java Platform, Standard Edition Development Kit (JDK). Only JDK 8 and 11 are supported. If you have another version of Java installed, you need to also install JDK 8 or JDK 11. Once you install the right JDK, use the following links to configure your setup:

Now that you’ve installed Visual Studio Code and enabled the necessary extensions, you need to test them out.

  1. In Visual Studio Code, open the Command Palette by pressing Ctrl+Shift+P (Windows) or Cmd+Shift+P (macOS).
  2. Enter sfdx to filter for commands provided by the Salesforce Extensions.

As you use more SFDX commands, those commands will show up in the recently used panel.

In the final step, you create your first Lightning web component and add it to your org’s home page.

We won’t check any of your setup. Click Verify Step to go to the next step in the project.