Install Visual Code Mac



  • In this article we will look at the steps of How to Download and Install Visual Studio Code on Windows and Mac operating systems. For the development of each programming language, there are multiple IDE (Integrated Development Environment) available.
  • Use the Visual Studio debugger to quickly find and fix bugs across languages. The Visual Studio for Mac debugger lets you step inside your code by setting Breakpoints, Step Over statements, Step Into and Out of functions, and inspect the current state of the code stack through powerful visualizations.
-->

— Visual Studio Code If you are only allowed to install an IDE on your Mac, I will not hesitate to choose VSCode. Visual Studio Code is a lightweight but powerful source code editor that runs on. How to cleanly / completely re-install VS Code on Mac. Jonathan March July 24, 2020 18:06. Reinstall VS Code, and Enthought Tools for Visual Studio Code.

In this article, you'll learn how to install .NET on macOS. .NET is made up of the runtime and the SDK. The runtime is used to run a .NET app and may or may not be included with the app. The SDK is used to create .NET apps and libraries. The .NET runtime is always installed with the SDK.

The latest version of .NET is 5.0.

Install Visual Studio Code Visual Studio Code is another one of those Microsoft products that suffers from weird-naming-convention-syndrome. Since the original “Visual Studio” still exists and is completely different from Visual Studio Code, it’s easy to get the two confused in a conversation.

Supported releases

The following table is a list of currently supported .NET releases and the versions of macOS they're supported on. These versions remain supported either the version of .NET reaches end-of-support.

  • A ✔️ indicates that the version of .NET Core is still supported.
  • A ❌ indicates that the version of .NET Core isn't supported.
Operating System.NET Core 2.1.NET Core 3.1.NET 5.0
macOS 11.0 'Big Sur'✔️ 2.1 (Release notes)✔️ 3.1 (Release notes)✔️ 5.0 (Release notes)
macOS 10.15 'Catalina'✔️ 2.1 (Release notes)✔️ 3.1 (Release notes)✔️ 5.0 (Release notes)
macOS 10.14 'Mojave'✔️ 2.1 (Release notes)✔️ 3.1 (Release notes)✔️ 5.0 (Release notes)
macOS 10.13 'High Sierra'✔️ 2.1 (Release notes)✔️ 3.1 (Release notes)✔️ 5.0 (Release notes)
macOS 10.12 'Sierra'✔️ 2.1 (Release notes)❌ 3.1 (Release notes)❌ 5.0 (Release notes)

Unsupported releases

The following versions of .NET are ❌ no longer supported. The downloads for these still remain published:

  • 3.0 (Release notes)
  • 2.2 (Release notes)
  • 2.0 (Release notes)

Runtime information

The runtime is used to run apps created with .NET. When an app author publishes an app, they can include the runtime with their app. If they don't include the runtime, it's up to the user to install the runtime.

There are two different runtimes you can install on macOS:

  • ASP.NET Core runtime
    Runs ASP.NET Core apps. Includes the .NET runtime.

  • .NET runtime
    This runtime is the simplest runtime and doesn't include any other runtime. It's highly recommended that you install ASP.NET Core runtime for the best compatibility with .NET apps.

SDK information

The SDK is used to build and publish .NET apps and libraries. Installing the SDK includes both runtimes: ASP.NET Core and .NET.

Dependencies

.NET is supported on the following macOS releases:

.NET Core VersionmacOSArchitecturesMore information
5.0High Sierra (10.13+)x64More information
3.1High Sierra (10.13+)x64More information
3.0High Sierra (10.13+)x64More information
2.2Sierra (10.12+)x64More information
2.1Sierra (10.12+)x64More information

Beginning with macOS Catalina (version 10.15), all software built after June 1, 2019 that is distributed with Developer ID, must be notarized. This requirement applies to the .NET runtime, .NET SDK, and software created with .NET.

The runtime and SDK installers for .NET 5.0 and .NET Core 3.1, 3.0, and 2.1, have been notarized since February 18, 2020. Prior released versions aren't notarized. If you run a non-notarized app, you'll see an error similar to the following image:

For more information about how enforced-notarization affects .NET (and your .NET apps), see Working with macOS Catalina Notarization.

libgdiplus

.NET applications that use the System.Drawing.Common assembly require libgdiplus to be installed.

An easy way to obtain libgdiplus is by using the Homebrew ('brew') package manager for macOS. After installing brew, install libgdiplus by executing the following commands at a Terminal (command) prompt:

Install with an installer

VisualCode

macOS has standalone installers that can be used to install the .NET 5.0 SDK:

Download and manually install

As an alternative to the macOS installers for .NET, you can download and manually install the SDK and runtime. Manual install is usually performed as part of continuous integration testing. For a developer or user, it's generally better to use an installer.

If you install .NET SDK, you don't need to install the corresponding runtime. First, download a binary release for either the SDK or the runtime from one of the following sites:

Visual Studio Code Mac Install

  • ✔️ .NET 5.0 downloads
  • ✔️ .NET Core 3.1 downloads
  • ✔️ .NET Core 2.1 downloads

Next, extract the downloaded file and use the export command to set variables used by .NET and then ensure .NET is in PATH.

To extract the runtime and make the .NET CLI commands available at the terminal, first download a .NET binary release. Then, open a terminal and run the following commands from the directory where the file was saved. The archive file name may be different depending on what you downloaded.

Use the following commands to extract the runtime or SDK that you downloaded. Remember to change the DOTNET_FILE value to your file name:

Tip

The preceding export commands only make the .NET CLI commands available for the terminal session in which it was run.

You can edit your shell profile to permanently add the commands. There are a number of different shells available for Linux and each has a different profile. For example:

  • Bash Shell: ~/.bash_profile, ~/.bashrc
  • Korn Shell: ~/.kshrc or .profile
  • Z Shell: ~/.zshrc or .zprofile

Edit the appropriate source file for your shell and add :$HOME/dotnet to the end of the existing PATH statement. If no PATH statement is included, add a new line with export PATH=$PATH:$HOME/dotnet.

Also, add export DOTNET_ROOT=$HOME/dotnet to the end of the file.

This approach lets you install different versions into separate locations and choose explicitly which one to use by which application.

Install with Visual Studio for Mac

Visual Studio for Mac installs the .NET SDK when the .NET workload is selected. To get started with .NET development on macOS, see Install Visual Studio 2019 for Mac.

.NET SDK versionVisual Studio version
5.0Visual Studio 2019 for Mac version 8.8 or higher.
3.1Visual Studio 2019 for Mac version 8.4 or higher.
2.1Visual Studio 2019 for Mac version 8.0 or higher.

Install alongside Visual Studio Code

Visual Studio Code is a powerful and lightweight source code editor that runs on your desktop. Visual Studio Code is available for Windows, macOS, and Linux.

While Visual Studio Code doesn't come with an automated .NET installer like Visual Studio does, adding .NET support is simple.

  1. Download and install Visual Studio Code.
  2. Download and install the .NET SDK.
  3. Install the C# extension from the Visual Studio Code marketplace.

Install with bash automation

The dotnet-install scripts are used for automation and non-admin installs of the runtime. You can download the script from the dotnet-install script reference page.

The script defaults to installing the latest long term support (LTS) version, which is .NET Core 3.1. You can choose a specific release by specifying the current switch. Include the runtime switch to install a runtime. Otherwise, the script installs the SDK.

Note

The previous command installs the ASP.NET Core runtime for maximum compatability. The ASP.NET Core runtime also includes the standard .NET runtime.

Docker

Containers provide a lightweight way to isolate your application from the rest of the host system. Containers on the same machine share just the kernel and use resources given to your application.

.NET can run in a Docker container. Official .NET Docker images are published to the Microsoft Container Registry (MCR) and are discoverable at the Microsoft .NET Core Docker Hub repository. Each repository contains images for different combinations of the .NET (SDK or Runtime) and OS that you can use.

Microsoft provides images that are tailored for specific scenarios. For example, the ASP.NET Core repository provides images that are built for running ASP.NET Core apps in production.

For more information about using .NET Core in a Docker container, see Introduction to .NET and Docker and Samples.

Next steps

  • How to check if .NET Core is already installed.
  • Working with macOS Catalina notarization.
  • Tutorial: Get started on macOS.
  • Tutorial: Create a new app with Visual Studio Code.
  • Tutorial: Containerize a .NET Core app.

In this article, you will find out how to install PHP Tools for VS Code. Getting it running is fast and simple, and it will take you just a few minutes.

Step 1 - Install VS Code for macOS.

Visual Studio Code is a free, open-source code editor that works for Windows, Linux and macOS 10.9 or higher. You can download it directly from its download page. If you need a detailed setup guide, click here.

Step 2 - Install PHP Tools for VS Code.

There are three ways to install PHP Tools for VS Code. All of them are quick and simple. You can choose the one that works best for you.

a. Online Installation:

The first way to install the extension is from the Visual Studio Marketplace.

  • Go to PHP Tools for VS Code on the Marketplace.

  • Click the green button 'Install' and open VS Code when prompted.

  • When PHP Tools for VS Code opens, just click 'Install'.

b. Installation through VS Code:

The extension can also be installed through the VS Code's extension manager.

  • Open VS Code.

  • Click the Extensions (Cmd+Shift+X) icon on the Activity Bar on the left of the main window. If you cannot see it there, open View/Extensions from the menu.

  • Write 'PHP Tools for VS Code' in the search input box. Select it.

  • Click 'Install'.

c. Offline Installation:

The last way is to download the extension file and install through the VS Code menu.

  • Download the .vsix installation file from DEVSENSE's download section.

  • When the download is complete, open VS Code.

  • On the View menu, select Command Palette (Cmd+Shift+P) and write the command 

    in the quick search box.

  • When the Open File Dialog opens, select the file with the .vsix extension which you downloaded.

    Note: Activation of the product requires Internet connection.

    For more detailed information, you can refer to managing extensions in VS Code.

Step 3 - Activation

After the successful installation, you should be prompted to activate your copy of PHP Tools. A pop-up window will show during the extension startup. Activation requires internet connection.

You will have to choose among 3 options:

  • 'I have the license key' allows you enter the license key section and activate the extension.

  • 'Get trial' sends you an e-mail with 14-day license key.

  • 'More information' will open this web page with purchase options and license information.

    Once you have the license key and close the pop-up window above, you can activate your copy of the extension using the VSCode's View - Command Palette (Cmd+Shift+P), command PHP Tools: Activate extension. Enter your license key and confirm pressing Enter.

    The activation requires Internet connection. The successful installation is confirmed with the following pop-up window:

Configuration options

After installing PHP Tools for VS Code, the PHP settings will be as shown in the following table. You can see all the preferences in the Code > Preferences > Settings menu.

Install Visual Code Mac Brew

SettingDescriptionValues
'php.executablePath': 'Path to the 'php' executable.Full path to the php program, or not set.
'php.problems.exclude': nullPath patterns to be ignored from reporting problems. Value can be set to 'true' to ignore all problems or a comma separated list of specific problem codes.Associative map of paths and whether to exclude them from problems checking.
'php.format.codeStyle': 'PHP Tools'Code style standard.'PHP Tools', 'PSR-2'
'phpTools.language': nullLanguage of PHP Tools IntelliSense.'en', 'de', 'es', 'fr', 'ja', 'pt', 'ro', 'ru', 'tr', 'zh', or not set.
'phpTools.language': nullShow a CodeLens above each test or suite for running or debugging the tests'en', 'de', 'es', 'fr', 'ja', 'pt', 'ro', 'ru', 'tr', 'zh', or not set.
'phpTools.phpUnit.codeLens': trueShow a CodeLens above each test or suite for running or debugging the teststrue or false.
'phpTools.phpUnit.codeLens': trueRetire or reset all test states whenever the test tree is reloadedRead more on PHPUnit.
'phpTools.phpUnit.onStart': 'Retire or reset all test states whenever a test run is startedRead more on PHPUnit.

If you have validation problems or in any case of need for linting, extra PHP options are as follows.

SettingDescriptionValues
'php.suggest.basic': trueControls whether the built-in PHP language suggestions are enabled. The support suggests PHP globals and variables.true or false
'php.validate.enable': trueEnable/disable built-in PHP validation.true or false
'php.validate.executablePath': nullPoints to the PHP executable.Any path to PHP. for example: |/usr/bin/php|
'php.validate.run': 'onSave'Whether the linter is run on save or on type.onSave, onType

Debugging

For debugging purposes, PHP has Xdebug. You can read about Xdebug features here.

For macOS users, you can install the Xdebug extension for your version of PHP using Homebrew. They recommend using PECL to install it. Another option is to compile the source code and then install.

PEAR/PECL is PHP's Package Repository for easy download and installation of Xdebug and also other tools. You can download PEAR from its Github page. Installing PEAR/PECL is as easy as writing the following on the terminal:

You still need to add the correct line to your php.ini (change the path and filename to the correct one, and make sure you’re using the full path):

Now you are ready to start your first project! Getting Started with PHP Tools: First PHP Project.

Install Visual Studio Code On Mac Using Homebrew

Related links