VS code theme colors

VS code theme colors

VS code theme colors can be overridden *per workspace*. Great for differentiating between projects

VS code theme colors can be overridden per workspace. Great for differentiating between projects

You can customize your active Visual Studio Code color theme with the workbench.colorCustomizations user setting.

{
	"workbench.colorCustomizations": {
		"activityBar.background": "#00AA00"
	}
}

Note: If you want to use an existing color theme, see Color Themes where you’ll learn how to set the active color theme through the Preferences: Color Theme dropdown (⌘K ⌘T (Windows, Linux Ctrl+K Ctrl+T)).

Color formats

Color values can be defined in the RGB color model with an alpha channel for transparency. As format, the following hexadecimal notations are supported: #RGB, #RGBA, #RRGGBB and #RRGGBBAA. R (red), G (green), B (blue), and A (alpha) are hexadecimal characters (0-9, a-f or A-F). The three-digit notation (#RGB) is a shorter version of the six-digit form (#RRGGBB) and the four-digit RGB notation (#RGBA) is a shorter version of the eight-digit form (#RRGGBBAA). For example #e35f is the same color as #ee3355ff.

If no alpha value is defined, it defaults to ff (opaque, no transparency). If alpha is set to 00, the color is fully transparent.

Some colors should not be opaque in order to not cover other annotations. Check the color descriptions to see to which colors this applies.

Contrast colors

The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Base colors
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Text colors

Colors inside a text document, such as the welcome page.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Button control

A set of colors for button widgets such as Open Folder button in the Explorer of a new window.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Dropdown control

A set of colors for all Dropdown widgets such as in the Integrated Terminal or the Output panel. Note that the Dropdown control is not used on macOS currently.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Input control

Colors for input controls such as in the Search view or the Find/Replace dialog.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Scrollbar control
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Badge

Badges are small information labels, for example, search results count.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Progress bar
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Lists and trees

Colors for list and trees like the File Explorer. An active list/tree has keyboard focus, an inactive does not.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Activity Bar

The Activity Bar is displayed either on the far left or right of the workbench and allows fast switching between views of the Side Bar.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Side Bar

The Side Bar contains views like the Explorer and Search.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Editor Groups & Tabs

Editor Groups are the containers of editors. There can be many editor groups. A Tab is the container of an editor. Multiple Tabs can be opened in one editor group.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Editor colors

The most prominent editor colors are the token colors used for syntax highlighting and are based on the language grammar installed. These colors are defined by the Color Theme but can also be customized with the editor.tokenColorCustomizations setting. See Customizing a Color Theme for details on updating a Color Theme and the available token types.

All other editor colors are listed here:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Selection colors are visible when selecting one or more characters. In addition to the selection also all regions with the same content are highlighted.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Word highlight colors are visible when the cursor is inside a symbol or a word. Depending on the language support available for the file type, all matching references and declarations are highlighted and read and write accesses get different colors. If document symbol language support is not available, this falls back to word highlighting.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Find colors depend on the current find string in the Find/Replace dialog.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The hover highlight is shown behind the symbol for which a hover is shown.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The current line is typically shown as either background highlight or a border (not both).

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The link color is visible when clicking on a link.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The range highlight is visible when selecting a search result.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

To see the editor white spaces, enable Toggle Render Whitespace.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

To see the editor indent guides, set "editor.renderIndentGuides": true.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

To see editor rulers, define their location with "editor.rulers"

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

CodeLens:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Bracket matches:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Overview ruler:

This ruler is located beneath the scroll bar on the right edge of the editor and gives an overview of the decorations in the editor.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Errors and warnings:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Unused source code:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The gutter contains the glyph margins and the line numbers:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Diff editor colors

For coloring inserted and removed text, use either a background or a border color but not both.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Editor widget colors

The Editor widget is shown in front of the editor content. Examples are the Find/Replace dialog, the suggestion widget, and the editor hover.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The Debug Exception widget is a peek view that shows in the editor when debug stops at an exception.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

The editor marker view shows when navigating to errors and warnings in the editor (Go to Next Error or Warning command).

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Peek view colors

Peek views are used to show references and declarations as a view inside the editor.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Merge conflicts

Merge conflict decorations are shown when the editor contains special diff ranges.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Panel colors

Panels are shown below the editor area and contain views like Output and Integrated Terminal.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Status Bar colors

The Status Bar is shown in the bottom of the workbench.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Title Bar colors
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Menu Bar colors
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Notification colors

Note: The colors below only apply for VS Code versions 1.21 and higher.

Notification toasts slide up from the bottom-right of the workbench.

Once opened in the Notification Center, they are displayed in a list with a header:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

If you target VS Code versions before the 1.21 (February 2018) release, these are the old (no longer supported) colors:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Extensions
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Quick picker
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Integrated Terminal colors
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Debug
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Welcome page
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Git colors
  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Settings Editor colors

Note: These colors are for the GUI settings editor which can be opened with the Preferences: Open Settings (UI) command.

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Breadcrumbs

The theme colors for breadcrumbs navigation:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.
Snippets

The theme colors for snippets:

  • contrastActiveBorder: An extra border around active elements to separate them from others for greater contrast.
  • contrastBorder: An extra border around elements to separate them from others for greater contrast.

Color ids can also be contributed by extensions through the color contribution point. These colors also appear when using code complete in the workbench.colorCustomizations settings and the color theme definition file. Users can see what colors an extension defines in the extension contributions tab.

Extension colors

Color ids can also be contributed by extensions through the color contribution point. These colors also appear when using code complete in the workbench.colorCustomizations settings and the color theme definition file. Users can see what colors an extension defines in the extension contributions tab.

Learn More

Complete Java Masterclass

Complete Python Bootcamp: Go from zero to hero in Python 3

Angular 7 (formerly Angular 2) - The Complete Guide

☞ [The Complete JavaScript Course 2018: Build Real Projects!](http:// deal.codetrick.net/p/rJWeUz65Z “The Complete JavaScript Course 2018: Build Real Projects!”)

Become a JavaScript developer - Learn (React, Node,Angular)

The Complete Node.js Developer Course (2nd Edition)

The Complete React Web Developer Course (2nd Edition)

Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)

Build Responsive Real World Websites with HTML5 and CSS3

PHP for Beginners - Become a PHP Master - CMS Project

Deploy an Angular App from Visual Studio Code to Azure

Deploy an Angular App from Visual Studio Code to Azure

Deploy an Angular App from Visual Studio Code to Azure - What do you get when you mix Angular 6, Node 10, Visual Studio Code and Azure? A really quick and slick way to develop and deploy a web application using the latest and greatest technologies. Keep reading to find out how.

Deploy an Angular App from Visual Studio Code to Azure - What do you get when you mix Angular 6, Node 10, Visual Studio Code and Azure? A really quick and slick way to develop and deploy a web application using the latest and greatest technologies. Keep reading to find out how.

This article will discuss how to:
  • Setup a free Node server on the cloud using Azure App Service
  • Build a basic Angular 6 web app running on Node 10
  • Use Visual Studio Code to deploy the web app from a local development machine to Azure
Prerequisites

You will need a free Microsoft Azure account with any Azure subscription. If you don’t have a paid subscription, a Pay-As-You-Go subscription is fine. All Azure services used in this article are free for development and testing purposes.

You will also need the following tools installed on your development machine:

  • Setup a free Node server on the cloud using Azure App Service
  • Build a basic Angular 6 web app running on Node 10
  • Use Visual Studio Code to deploy the web app from a local development machine to Azure

The instructions in this article assume Visual Studio Code v1.28, Node 10.6.0 and Angular CLI v6.1.1 although other versions may work too.

Set Up a New Web App on Azure

The first thing to do is setup the Web App (server) on the Azure cloud. The Azure portal or the Azure CLI can be used to create a new Web App. This article will demonstrate how to setup a server using the Azure portal.

To setup a Node.js server on Azure, you will need to create an App Service plan and a Web A_pp_. The App Service plan will be created on the F1 Free tier which provides a basic free virtual server suitable for development (1 GB ram, 1 hour CPU time / day).

To create the App Service plan:

  1. Locate “App Service plan” using the resource search in the Azure Portal
  2. Fill in the App Service plan name, Resource Group and make sure you select the “F1 Free” pricing tier. The free pricing tier can be found under the “Dev / Test” tab.

To create your Web App:

  1. Locate “App Service plan” using the resource search in the Azure Portal
  2. Fill in the App Service plan name, Resource Group and make sure you select the “F1 Free” pricing tier. The free pricing tier can be found under the “Dev / Test” tab.

You should now see your App Service plan and Web App on your Azure dashboard.

The web server is now ready.

You might be wondering why you don’t have to specify the type of web server to use when creating an Azure Web App. This is because Azure Web Apps conveniently support .NET, .NET Core, Java, Node.js, PHP and static HTML websites out of the box.## Set up Local Development Environment

The next step is to set up a local development environment including a local Node.js server, an Angular 6 application, Visual Studio Code and the Azure App Service extension.

The Local Node.js Server

A Node.js server needs to be installed on your development machine to build and test locally. I recommend that you use the Node Version Manager (NVM) command-line utility to manage and switch between multiple Node.js versions installed on your development machine. If you have NVM installed, installing the right version of Node.js is as simple as running these commands:

nvm install 10.6.0 64
nvm use 10.6.0

You should always make sure that your local server and remote server versions are in sync. Azure Web Apps support many versions of Node.js including v10.6.0.

The Angular App

You can generate an Angular 6.x app shell using the Angular CLI:

npm install -g @angular/cli
npm new canadian-maple

Alternatively, if you want to work with something a little more flashier and Canadian then clone the official Canadian Maple app from GitHub. The rest of this article will assume you did!

Visual Studio Code

Visual Studio Code combined with the Azure App Service extension can be used to develop, package and deploy the web app to Azure cloud.

Open up Visual Studio Code in the directory of your Angular app. Use the ng serve command in the integrated terminal (CTRL-~ shortcut) to run and verify your app .

Azure App Service Extension

Install the Azure App Service extension from the Visual Studio Code marketplace. After installing the extension and reloading Visual Studio Code, you will notice a new Azure icon in the left navigation bar. Click on the Azure icon to open the extension and select the option to sign into Azure.

After signing into Azure, you will see the “canadianmaple” Web App that was created previously.

You might be wondering why you don’t have to specify the type of web server to use when creating an Azure Web App. This is because Azure Web Apps conveniently support .NET, .NET Core, Java, Node.js, PHP and static HTML websites out of the box.> You might be wondering why you don’t have to specify the type of web server to use when creating an Azure Web App. This is because Azure Web Apps conveniently support .NET, .NET Core, Java, Node.js, PHP and static HTML websites out of the box.## Update Node Version on Azure Web App

Chances are the default version of Node on the Azure Web App is not the version that you want to use. Luckily, the version of node can be changed with the WEBSITE_NODE_DEFAULT_VERSION environment variable. Navigate to the Application settings section of the Application settings page for your Azure Web App. Click on the environment variable value to change it to 10.6.0.

You might be wondering why you don’t have to specify the type of web server to use when creating an Azure Web App. This is because Azure Web Apps conveniently support .NET, .NET Core, Java, Node.js, PHP and static HTML websites out of the box.
After changing the Node version, you can verify that the setting took effect by using the Console development tool and issuing the node -v command:

Deploying the App

Build the web application before deploying with the ng build command. This command will create the dist/canadian-maple directory containing a transpiled, minified, ready-to-deploy version of your application.

Deploying to an Azure Web App is as simple as right-clicking on the web app in the Azure App Service extension and selecting the “Deploy to Web App” option. The extension will make a suggestion on what to deploy but use the Browse option to select the dist/canadian-maple folder instead.

You will see a few prompts and notifications:

  • Setup a free Node server on the cloud using Azure App Service
  • Build a basic Angular 6 web app running on Node 10
  • Use Visual Studio Code to deploy the web app from a local development machine to Azure

Once the deployment is complete, you will receive a notification with a convenient button to browse to the site.

You have just deployed an Angular 6 app running on Node 10.6.0 to the Azure cloud… relatively painlessly! Check out http://canadianmaple.azurewebsites.net to see a live example.

Recap

Let’s recap what has been accomplished:

  • Setup a free Node server on the cloud using Azure App Service
  • Build a basic Angular 6 web app running on Node 10
  • Use Visual Studio Code to deploy the web app from a local development machine to Azure

Now wasn’t that fast and painless?

*Originally published by Brian De Sousa at *https://briandesousa.net

==========================

Follow me on Facebook | Twitter

Learn More

☞ Angular 8 (formerly Angular 2) - The Complete Guide

☞ Learn and Understand AngularJS

☞ The Complete Angular Course: Beginner to Advanced

☞ Angular Crash Course for Busy Developers

☞ Angular Essentials (Angular 2+ with TypeScript)

☞ Angular (Full App) with Angular Material, Angularfire & NgRx

☞ Angular & NodeJS - The MEAN Stack Guide

Visual Studio 2019 Tips and Tricks

Visual Studio 2019 Tips and Tricks

Visual Studio 2019 Tips and Tricks

Microsoft recently released the preview of Visual Studio 2019 for Windows, and it’s got lots of improvements and features! After reading the release notes, I reached out to Allison Buchholtz-Au and Kendra Havens on the Visual Studio team at Microsoft to get an idea of what features should be configured immediately after downloading and installing this shiny new IDE. After they showed me a couple of quick tips, VS 2019 started to feel like the superhero that can make anyone more effective as an ASP.NET developer. Let’s dive into the good stuff!

Download Visual Studio 2019

First, download Visual Studio 2019 for your Windows operating system. If you don’t have it, you can download Visual Studio 2019 Preview for free.

Decompiled Resources

Visibility into how an external library or dependency resource is handling the data you are giving it can provide valuable insight. Visual Studio 2019 now provides this feature, but you do need to set it up. Follow the steps below to enable it.

Go to the top menu bar. Select Tools > Options. Type “decompile” into the search bar. The Advanced section of Text Editor for C# will appear. Click on Advanced.

Check the box that says Enable navigation to decompiled sources (experimental). Now you can debug and step into the external packages you pull in from Nuget and elsewhere! I found this incredibly useful right away.

Code Cleanup

Similar to Format Document, this new feature allows you to configure a predefined set of several rules to clean up in your code all at once. To set this up, follow the steps below.

Click the little broom icon at the bottom of the window. Select Configure Code Cleanup.

You will be presented with a configuration menu. Notice that there are two profiles available to you to add or remove filters from. This is to allow a couple of different cleanups to be configured at the same time, and you can select whichever profile you need. You cannot add more profiles at this time. I found this to be helpful to set up different filters for a solution that has both front end and back end projects inside of it.

Select any filter you want and press the up arrow [ ^ ] to add it. Click OK.

Now you can run Code Cleanup for the profile you added your filter to. Click the broom icon again and select Run Code Cleanup (Profile 1).

In this example, not only did it sort the usings at the top of the auto-generated file, but it also removed the unnecessary ones. I added tons of filters after this to all run at once! This is probably one of my favorite new features in Visual Studio 2019.

Editorconfig Export for your Team

Interested in sharing editor configuration with your team, or importing your team’s standard one? Sometimes the tabs vs spaces battle is due to what a developer has set up locally in their IDE. One solution is to export the agreed upon code styling standards and distribute it to everyone. This is a handy new feature in Visual Studio 2019. Follow below to set it up!

To export preferred code styles, go to the top menu bar. Select Tools > Options. Type “code style” into the search bar. The Text Editor for C# will appear. Click on Code Style. Notice the list under formatting that you can set up and configure. Once you have everything just as you like it, click on Generate .editorconfig file from settings.

It will prompt you to save the configuration file. For this example, name it test.editorconfig. I would suggest saving it somewhere within your team’s code repository for this solution or project. That ensures it comes along with the project when cloned.

Now let’s import the code styles into your local Visual Studio 2019 environment. Right-click on the Solution, go to Add and select Existing Item.

Navigate to the saved location of your test.editorconfig file and click Add. Your environment will now use the imported configuration settings set up for your team.

If you are interested in the script generated for that, click on test.editorconfig right underneath Solution Items name and take a look!

Solution Filter

Ever had a monolithic solution with way too many projects inside of it? Does it all take a while to load? Now you can save the state of your solution with only the desired projects loaded up. Follow along to set up a better solution when you are working on that huge team repository.

First, open up the whole solution with all of the projects in it. This may take a while to load.

Unload the projects you aren’t using by right-clicking on each project and select Unload Project.

Now that you have only the desired projects loaded up, you can save the state of the solution by right-clicking on the Solution, and selecting Save as Solution Filter.

Save the file and name it bettersolution.snlf at the top of the repo. Close the solution. Now open the new solution you just saved.

It should load MUCH faster this time.

Notice that only your chosen projects are loaded, and all of the unloaded ones are left completely out now - leaving a clean and relevant solution file. However, in the event that you would like to add back all of the unloaded projects, the solution filter still retains that context for you. If you right-click on the Solution name and select Load All Projects, everything will be restored.

This was a pretty nice way to keep everything organized and loading fast when first opening up the solution in Visual Studio 2019. This can be really refreshing for any enterprise developer who deals with multiple projects.

But Wait, There’s More!

Interested in what else this new release has to offer? Get more information about the features that are enabled right out of the box with Visual Studio 2019 by checking out the Release Notes and FAQ on Microsoft’s preview site.

Top 10 VS Code Extensions You should know in 2020

Top 10 VS Code Extensions You should know in 2020

In this article I will recommend 10 VS Code extensions for front-end engineers working with HTML, CSS, JavaScript and frameworks like VueJS or ReactJS

Visual Studio Code had 2.6 millions monthly active users in 2017 (last official number I could find, certainly more by now) and is the arguably the best code editor out there at the moment. One of the best features is the Market Place offering tons of extensions to customize it exactly to your needs and helping you in writing high quality code. In this article I will recommend 10 VS Code extensions for front-end engineers working with HTML, CSS, JavaScript and frameworks like VueJS or ReactJS (This list is not in order of their importance)

1. NPM

ANPM Screenshot

Every developer knows NPM - the Node Package Manager. This extension helps you to manage your Package.json, provides warnings if dependencies are not installed yet and helps with version control.

2. Prettier

Prettier Screenshot

Prettier from Esben Petersen is a pretty neat extension that has been downloaded close to 14 million times already. It helps you formatting your code and provides color keywords for more readable code.

3. JavaScript Code Snippets

JavaScript Code Snippets Screenshot

This extension was created by Charalampos Karypidis and has been downloaded 4.5 million times so far. It provides Code Snippets for writing JavaScript, Typescript, React, Vue, HHTML, ... and supports ES6 syntax.

4. CSS Peek

CSS Peek Screenshot

CSS Peak helps you when working markup language class strings and IDs by identifying and enumerating the different styles that are already applied. This comes handy because you no longer have to jump between HTML and CSS files.

5. Vetur

Vetur Screenshot

Vetur is the official VueJS Extension and was downloaded more than 20 million times already. It provides error checking capabilities, auto-completion features and provides Vue snippets. This is really cool if you are a Vue developer like me!

6. ESLint

ESLint Screenshot

ESLint - what can I say. Many people love linting, many do not. But the value linting provides for clean code is hardly arguable and this extension with 24 million downloads is the best tool for it if you develop with JavaScript.

7. Live Sass Compiler

Live Sass Compiler Screenshot

The Live Sass Compiler extension is a small but powerful tool that can compile your SASS/SCSS files to CSS files in real time and provide a live preview of the compiled styles in your browser.

8. Debugger for Chrome

Debugger for Chrome Screenshot

Chrome for many developers is the number one browser when it comes to developing, testing and debugging there code. With this official extension for VS Code you can do so directly from Visual Studio Code - how cool is that!

9. Live Server

Live Server Screenshot

Live Server by Ritwick Dey who also created Live Sass Compiler creates a local development server right in Visual Studio Code to serve your static and dynamic sites. Using the go-live button in your editor you can serve your code right away and the extension also supports live reloading - neat!

10. Beautify

Beautify Screenshot

Last but not least in this collection comes Beautify, another great extension for code formatting much like Prettier. Almost 12 million downloads speak for themselves and you can format code written in JavaScript, JSON, CSS, Sass and HTML.

Conclusion

This collection is far from being complete and the extensions are not necessarily the best but I hope it provides you with some very good tools to help you writing high quality code and become a better web developer. Let me know in the comments if you find something useful or have other suggestions for extensions you think are first class.

Top Python IDEs for Data Science in 2019

Top Python IDEs for Data Science in 2019

In this article, you'll be given an overview of the top Python IDEs used for data science.

As you start your coding journey, many of you prefer coding in a text editor like emacs, notepad++, etc., wherein you write a code and then open a terminal window to execute your code. When there is an error detected in your code, you switch back to the text editor, correct the error or typos, and re-run the code from the terminal. All of this seems like good practice only at the beginner level when you are writing your first Hello, World!. However, as you move from a beginner to an intermediate level, your code complexity starts to increase, and that is when you need a tool that provides you far more utilities than just letting you write mere text.

When you move up the ladder in your coding journey, you not only have to code but you also need to make sure your code works in all scenarios, which means you also need a testing module. Many times, you have multiple coding and unit test files, and switching from editor to terminal often becomes irritating, confusing, and inefficient. Life is happier and more relaxed when you can write, run, and play with your code from one place.

One that provides you with the capability of not just coding, testing, and running your code from one tool, but also highlighting your syntax, bracket-matching, auto-completing your code, debugging, code suggestions and a lot more, is called Integrated Development Environment or more commonly known as IDE.

For the past couple of years, Jupyter Notebook has been gaining a lot of popularity in terms of coding and debugging. Notebooks have been redefining the concept of an IDE and are adding more and more features into it.

This tutorial is actually written in a Jupyter Notebook. How cool is that?

Should you ignore text editors?

The answer to this is No. Let's take a closer look at it with the help of the Stack Overflow Developer Survey 2019 statistics.

From the above statistics, it isn't that surprising that even though you have been reading that the integrated development environments are the best compared to text editors. Notepad++ is still in the most popular development environments, according to Stack Overflow.

So based on the above statistics, a lot of text editors can be used as a development environment if you add the correct plugins.

For example, the most popular text editor Notepad++ can also be leveraged as a debugger by installing a plugin called DBGP that lets you debug and execute your code.

After looking into it, it makes a lot more sense why a text editor is considered the most popular on the development list. Text editors can be made as powerful as an IDE like PyCharm, Spyder, etc. by adding features on top of it that you might need. Even though the IDEs come with all these features already installed, installing a text editor is far easier, and they are lightweight compared to the IDEs.

Let's also see which are the most popular Python IDE and text editors. It's important to note that the below statistics are from December 2018 and should give a good understanding of what is popular today.

Finally, let's start decoding each IDE one by one and understand their capabilities and why they are the best amongst the rest.

1 - Jupyter Notebook

Jupyter was introduced in the Year 2014 after its predecessor IPython and from that date it is considered to be a bliss for the coding community. Jupyter stands for Julia, Python, and R, which are the open-source languages for data science. The acronym of Jupyter, however, does not mean that it's only meant for Julia, Python, and R.

Jupyter Notebook not only provides you the capability to code in one of the above three programming languages, but it also comes with a markdown editor that lets you write HTML code, LaTeX, etc.

It is a web application based server-client structure which is easy-to-use and allows you to create, analyze, and manipulate documents in the form of notebooks. Since it is a web interface, it can integrate many of the existing web libraries for data visualization, including plotly.js.

As shown in the above figure, Jupyter has so many functionalities. You can write a formula using LaTeX, run a Python code, and visualize, for example, a raw audio signal using matplotlib plotting library all in the same notebook.

Jupyter Notebook is not just a mere IDE, but it is widely used as an education tool, for presentations, and even for writing blogs. You can export your notebook from .ipynb format to PDF and HTML files, or you can just export it as a .py file. The user-interface of Jupyter makes it a favorite tool, especially amongst the data science community.

If you are only interested in Downloading Jupyter Notebook, then you can follow this link.

2 - PyCharm

PyCharm is an IDE for Python programming developed by the Czech company JetBrains, and as the name suggests, it works like a Charm even though it a heavy-weight software. Though it can take time for plot rendering, etc. when compared with other IDEs.

If you have never used JetBrains other IDEs like Java IDE, IntelliJ IDEA, then running your first code successfully can eat up a little bit of your time. Such as setting up its interpreter. PyCharm is, however, especially useful if you have multiple scripts interacting with each other.

PyCharm comes with pre-installed intelligent python assistance that provides a variety of functions like smart code completion, code inspections, on-the-fly error highlighting and quick-fixes, along with automated code refactorings and a plethora of navigation capabilities.

It not only lets you code in Python but has extensive support for web development frameworks like Django, Flask, HTML/CSS, Node.js, Pyramid, web2py, etc.

The good thing about PyCharm is that it supports Anaconda and as a result of which all the packages that fall under Anaconda are supported by PyCharm like NumPy, SciPy, MatPlotlib, and so on.

Just like other IDEs, PyCharm has a powerful debugger with a graphical interface. It offers Git integration, has an ssh terminal, and version control. PyCharm IDE is customizable, which allows you to choose between different themes, color schemes, and key-binding.

Additionally, PyCharm lets you add plugins for non-pythonic files, and these plugins take care of the indentation, highlighting of errors and keywords on-the-fly.

One of the PyCharm 2019 updates, as shown in the above figure, is editing the source code in your Notebook. This, however, only comes with a Pro edition: as you edit the Notebook, the source code looks like a regular Python file in the PyCharm editor. All the changes made in either PyCharm or the browser are reflected immediately.

Both of PyCharm's Professional and Community edition can be downloaded from the official JetBrains website. It is available for Windows, Linux, and Mac operating systems.

3 - Spyder

Spyder is a lightweight open-source IDE that comes pre-installed with Anaconda distribution and was built mainly for data science practitioners. It may not have an appealing user-interface as PyCharm or Visual Studio, but you should give it a try given the number of functionalities it has to offer!

Because it was built for the data science community, it is integrated with the essential data-centric libraries like NumPy, SciPy, Matplotlib, Pandas, and IPython. The built-in capabilities can be extended further by plugins and APIs.

One of the great features that you would like about Spyder is its Help toolbar, which lets you search a plethora of information related to libraries/modules.

Spyder contains features like a text editor with syntax highlighting, code completion, static code analysis, debugging, and variable exploring. It also has a profiler that recursively determines the run time and number of calls for every function and method called in a file. Moreover, some of the less essential features but still adds value in making Spyder one of the best IDEs are file explorer, history log, internal console, and so on.

Since spyder is open-source, it is free, and since it comes packaged with Anaconda, you will need to download Anaconda from this website. Like other IDEs, Spyder is available for Windows, Mac, and Linux operating systems.

To learn how to install Anaconda, check out the documentation.

4 - Visual Studio Code

Visual Studio (VS) Code is an open-source IDE that was developed by Microsoft four years back, i.e., in the Year 2015. Visual Studio Code has support for all three operating systems; Windows, Linux, and macOS.

VS Code has a lot of built-in features like debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, snippets, and code refactoring. It is very much customizable, allowing users to change the theme, keyboard shortcuts, preferences, and install plugins that add additional functionality. It also has a terminal embedded into it.

The fun part about VS Code is that it has a minimalist zen mode, which shows you only the file you're working on, hiding not just code's interface, but the rest of your desktop too. This way it keeps you away from distractions and more focussed towards the code you are writing or the error you are debugging for hours and hours.

VS Code also has unit testing support via unit tests, pytest frameworks. It has Linting support which highlights syntactical and stylistic problems in your Python source code. Like PyCharm, VS Code also has a code editing feature for Jupyter environments and notebooks.

Visual Studio Code can be downloaded from here.

Which is the Best IDE?

The answer to this is subjective, but it would still be a good idea to start with an IDE that is less convoluted if you are at a beginner level. Once you get a good handle on coding, you should then switch to a better IDE that has a lot of the built-in features that will allow you to code more efficiently.

The above list is a subset of all the IDEs that are out there in the market. It would be best if you test each one of them and find out which one best suits your needs. Some of you might be inclined towards using Jupyter Notebook while some might like PyCharm more, it will be tough to pick one amongst the others.

Conclusion

When it comes to coding, IDEs are no doubt the best; they give you an excellent experience by improving your overall results and the workflow. They help you in coding your ideas and logic much more efficiently and in a neat manner. They have so much to offer starting with writing, running, and debugging your code apart from providing you with a great user-interface with various themes and colors.

How to Update Node.js Via Visual Studio, NPM, Windows/Mac

How to Update Node.js Via Visual Studio, NPM, Windows/Mac

I hope that you will find Node version 12 new capabilities compelling and soon you will upgrade your app to it.

In turn, you will get advanced debugging, intelligent coding with the powerful IntelliSense engine, interactive window, quick tracking of performance issues, unit testing, typescript integration, source control, cloud integration, and npm integration.

To get started in this walkthrough, this post captures the steps on how to update Node.js in Visual Studio, Windows/macOS, and NPM.

First, see a couple of useful tricks to check which Node.js npm version you have installed:

Write the command line to update Node.js npm:

“node -v” or “npm -v” simply type the one you want to check.

If the installed version of npm is not the latest one, you can update it using the syntax code:

npm [email protected] -g

(Note: The -g flag is used to update npm globally.)

Secondly, see which Node/Npm version Visual Studio you are using.

Now, use Visual Studio Command Prompt that is also called Visual Studio plugin. It can help you open a command line.

If you are not able to use Visual Studio Command Prompt, you can use the “Task Runner Explorer” by adding a task and running it in this way:

"check": "node -v && npm -v"

Another way is using C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\” on your Window’s.

(Note: This way you will come to know about the local version of your Visual Studio.)

If you have any issues with these steps, you can call for help from the industry’s best Node.js developers on a particular project on which you happen to be working.

All of this is fine. A developer is expecting to have Node.js updated on Microsoft Visual Studio that supports all those new features.

Steps to Update Node.js in Visual Studio

Development teams usually build one or two node.js update strategy that can be sometimes using an automated process. Or, sometimes updates can be based on the goodwill of the developer. The second one seems to be the riskiest approach. Consider applying the first strategy by using automated tools to update node.js.

For Example:

The tool like greenkeeper offers automatic dependency management for node.js npm dependencies. It improves your code quality, catches problems that you would have missed, easy to use, and reliable.

So, if you wish to get an update Node.js, there’re actually simple ways to do so. Here are the ways how to update node.js in Visual Studio and various operating systems.

Start by installing the new global version on node.js on your computer. Simply visit the Node.js download page and start installing the new version. Like the newest version, Node 12 is packed with notable features.

  • Node 12 runs on the V8 engine for faster JavaScript execution
  • Improved startup time by 30%
  • Node 12 supports TLS 1.3 for increased security of codes
  • N-API improvements to prevent libraries from breaking

To tell Visual Studio to use the global version follow the command:

Go to Tools > Options > Projects and Solutions > External Web Tools

Visual Studio uses the $(PATH) to look for its external tools. When performing node.js installation make sure that the $(PATH) should be first on your list.

If that doesn’t work, you can restart the Visual Studio. Or, you can add the usual path directly to the list in which node.js is installed by clicking on “Add” and set “C:\Program Files\nodejs\.” Now, restart the system and recheck the node.js update process.

(Note: If it doesn’t work, make sure node.js is actually installed in that folder. If it is there, but still not work, try uninstalling, remove that folder manually, and install it again.)

For more help on all such update & installation issues of Node.js, you can get help from the outsourcing software development firm or industry’s best developers.

How to Update Node.js on Windows and Mac Operating System?

Already familiar with the Node.js updating steps on Windows. Great, these are the foundation of a successful development strategy. However, in the past decade, the node.js development world had gone through dramatic changes but the updating processes were left intact. Some modern node.js update techniques can even replace the traditional ones to give you a better and leaner update strategy with a better ROI.

Example:

If you wish to upgrade Node.js on Windows and Mac OS, then simply visit the Node.js homepage and select your operating system.

From there, a wizard will magically update your Node, and replace the older version with the new one.

Now, See How to Update Node.js Using npm (Node Package Manager)

To update node.js you can use Node Package Manager (npm) that is already preinstalled. But before you start updating node.js, make sure your npm is of the latest version. Here are a few simple steps to follow to update your npm.

First, you need to find out the version of your Node Package Manager (npm), by running npm -v command.

After checking the version, you can run the command npm install [email protected] -g to install the latest version of Node Package Manager.

Finally, use the command npm -v to check whether your new version of npm was successfully installed or not.

Further, to update node.js using npm, use n module. Also, use the following code to clear cache memory from your Node Package Manager and install the latest version of node.js:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

(Note: If you are looking for a specific version of node.js, you can also use the command n #.#.#.)

Also, See the Steps for Updating NPM (Node Package Manager) in Visual Studio

This will not take much of your time. If you have installed node.js from their official website, you probably have installed NPM with it. To check it, you can use the command line: “npm-v”.

To upgrade npm in Visual Studio, you can follow the command:

cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External\ npm install [email protected]

This is how you can update Visual Studio’s NPM version to the latest one.

Final Words — Improve Your Skills with the Right Knowledge

There are various other techniques to update node.js that can help you take the right steps at the right time. Nevertheless, many developers neither having a strategy for effectively performing node.js update. Spending a few hours on reading the steps I have shared here can make a great difference to your knowledge on node.js updates and development processes.

Originally published by  ryan0852 at habr.com


====================================================

Thanks for reading

If you liked this post, share it with all of your programming buddies!

Follow me on Facebook | Twitter

Moving from NodeJS to Go

NodeJS Logging: What should you know about logging?

Start Working with Voice Driven Application with Nodejs

Node.js / Javascript performance coding tips to make applications faster

How to Build a URL Shortener With Node.js and MongoDB