The May update also provides an ability for developers to debug their C/C++ Cygwin/MinGW applications using Visual Studio Code. To work with cygwin or MinGW, the debugger path must be set manually in the launch configuration file launch.json. With the help of the latest update, you will be able to debug console applications on the Mac using GDB. In Visual Studio Code tasks are defined for a workspace and Visual Studio Code comes pre-installed with a list of common task runners. In the command palette (Ctrl+Shift+P (Win, Linux), ⇧⌘P (Mac)) you can type tasks and look at all the various task related commands.
Set up and Install Visual Studio for Mac. 3 minutes to read. Contributors. In this article Requirements To start developing native, cross-platform apps when you download Visual Studio for Mac there are a couple of things that you must install and set up in preparation. For working with iOS in Visual Studio you need the following pieces:. a Mac with macOS Sierra 10.12 or above.
Xcode 8.3 or above. The latest stable version is usually recommended.
An Apple ID. If you don't have an Apple ID already you can create a new one at. It's necessary to have an Apple ID for installing and signing into Xcode. Tip Visual Studio 2019 for Mac preview is for testing. Install.
Download Visual Studio for Mac from. Once the installer package is downloaded, click the VisualStudioForMacInstaller.dmg file to mount the installer and then run it by double-clicking the logo, as illustrated by the following image:. You might be prompted with an alert dialog similar to the following image. In this case, click Open:. The installer inspects your system to verify which components need to be installed or updated:. You'll then be presented with an alert dialog asking you to acknowledge the Privacy and License terms.
Press the Continue button to acknowledge the terms:. The installer presents a list of required components that are missing and that need to be downloaded and installed. Select the products you wish to download here: If you do not wish to install all platforms, use the guide below to help you decide which platforms to install:. Apps using Xamarin:. Xamarin.Forms – Select Android and iOS platforms.
iOS only – Select iOS platform (Note that you will need to install ). Android only – Select Android platform (Note that you should also select the relevant dependencies). Mac only – Select macOS platform (Note that you will need to install ). Fully cross-platform Xamarin apps – Select Android, iOS, and macOS platforms.NET Core applications – Select.NET Core platform.
ASP.NET Core Web Applications – Select.NET Core platform. Cross-platform Unity Game Development – No additional platforms need to be installed beyond Visual Studio for Mac. Refer to the for more information on installing the Unity extension. This installation screen displays the version and size of each individual component. You can click each component to display a list of dependencies for that component (for Android), see additional packages that it downloads (for.NET Core), or view any additional applications required (for iOS and macOS):. Once you are happy with your selection, select the Install and Update button to start the installation process.
The installer starts the download and install process of the selected items:. You might be prompted to elevate the permissions necessary for individual components that are needed to complete installation.
Enter your administrator credentials here to continue the installation process:. Once the installation is successful, you can start developing apps in Visual Studio by pressing Start. Note If you chose not install a platform or tool during the original installation (by unselecting it in step #6), you must run the again if you wish to add the components later. Install Visual Studio for Mac behind a firewall or proxy server To install Visual Studio for Mac behind a firewall, certain endpoints must be made accessible in order to allow downloads of the required tools and updates for your software. Configure your network to allow access to the following locations:. Next Steps Installing Visual Studio for Mac allows you to start writing code for your apps. The following guides are provided to guide you through the next steps of writing and deploying your projects.
IOS. (To run your application on device). Android.NET Core apps, ASP.NET Core web apps, Unity game development For other Workloads, refer to the page. See also. Feedback.
Tips and Tricks Note: Tips and Tricks has moved to the official Visual Studio Code documentation at. The content is now at.
Pull requests and documentation issues are still greatly appreciated. Table of Contents.
The key bindings below may or may not be accurate with the latest build. See for the latest keyboard shortcut reference. Basics Insider Version of VS Code The Visual Studio Code team uses the Insiders version to test the latest features and bug fixes of VS Code. You can use this same version. For Early Adopters - Insiders has the most recent code changes and may lead to the occasional broken build.
Frequent Builds - New builds everyday with the latest bug fixes and features. Side-by-side install - Insiders installs next to the Stable build allowing you to use either independently. Getting Started Open the Welcome page to get started with the basics of VS Code. Help Welcome. Includes the Interactive Playground. Command Palette Access all available commands based on your current context. Mac: cmd+shift+p or f1 Windows / Linux: ctrl+shift+p or f1 Reference keybindings All of the commands are in the Command Palette with the associated key binding (if it exists).
If you forget what the key binding is use the Command Palette to help you out. Quick open Quickly open files. Mac: cmd+p Windows / Linux: ctrl+p Tip: Type '?' To view help suggestions. Navigate between recently opened files Repeat the Quick Open keyboard shortcut to cycle quickly between recently opened files. Open multiple files from Quick Open You can open multiple files from Quick Open by pressing the Right arrow key. This will open the currently selected file in the background and you can continue selecting files from Quick Open.
CLI tool Linux: Follow instructions. Windows: Follow instructions.
Mac: see below. Open the Command Palette ( F1) and type 'shell command'. Hit enter to execute Shell Command: Install 'code' command in PATH. # open code with current directory code.
# open the current directory in the most recently used code window code -r. # create a new window code -n # change the language code -locale=es # open diff editor code -diff # see help options code -help # disable all extensions code -disable-extensions.vscode folder Workspace specific files are in.vscode. For example, tasks.json for the Task Runner and launch.json for the debugger. Status Bar decorations Errors and Warnings Mac: shift+cmd+m Windows / Linux: ctrl+shift+m Quickly jump to errors and warnings in the project. Cycle through errors with f8 or shift+f8 You can filter problems by type ('errors', 'warnings') or text matching. Change language mode Mac: cmd+k m Windows / Linux: ctrl+k m If you want to persist the new language mode for that file type, you can use the Configure File Association for.
Command to associate the current file extension with an installed language. Customization There are many things you can do to customize VS Code. Change your theme.
Change your keyboard shortcuts. Tune your settings. Add JSON validation. Create snippets. Install extensions Check out the full. Change your theme Open the Command Palette and type 'themes'. You can install more themes from the extension Marketplace.
Additionally, you can install and change your File Icon themes. Change your keyboard shortcuts Keyboard Reference Sheets Download the keyboard shortcut reference sheet for your platform (, ). Keymaps Are you used to keyboard shortcuts from another editor? You can install a Keymap extension that brings the keyboard shortcuts from your favorite editor to VS Code. Go to Preferences Keymap Extensions to see the current list on the. Some of the more popular ones:. Customize your keyboard shortcuts Open the Command Palette and type 'keyboard shortcuts.'
You can now add your own keybindings in the file on the right. Tune your settings Open settings.json Mac: cmd+, Windows / Linux: File Preferences Settings or ctrl+, Format on paste. 'files.autoSave ': 'afterDelay ' You can also toggle Auto Save from the top-level menu with the File Auto Save. Toggle Sidebar Mac: cmd+b Windows / Linux: ctrl+b Zen Mode Mac: cmd+k z Windows / Linux: ctrl+k z Enter distraction free Zen mode.
Side by side editing Mac: cmd+ or cmd then click a file from the File Explorer. Windows / Linux: ctrl+ Linux: ctrl+2 You can use drag and drop editors to create new editor groups and move editors between groups. Switch between editors Mac: cmd+1, cmd+2, cmd+3 Windows / Linux: ctrl+1, ctrl+2, ctrl+3 Move to Explorer window Mac: cmd+shift+e Windows / Linux: ctrl+shift+e Create and open a file Mac: cmd+click Windows / Linux: ctrl+click Close the currently opened folder Mac: cmd+w Windows / Linux: ctrl+k f History Navigate entire history with ctrl+tab Navigate back. Mac: ctrl+- Windows / Linux: alt+left Navigate Forward. Mac: ctrl+shift+- Windows / Linux: alt+right Navigate to a file Mac: cmd+e or cmd+p Windows / Linux: ctrl+e or ctrl+p File associations Create language associations for files that aren't detected accurately (for example, many config files are JSON). Git config -global merge.tool code Pull request extension Review pull requests inside vscode Debugging Configure debugger f1 and select Debug: Open launch.json, select the environment.
This will generate a launch.json file. Works out of the box as expected for Node.js and other environments.
May need some additional configuration for other languages. See for more details. Breakpoints and stepping through Place breakpoints next to the line number. Navigate forward with the Debug widget. Data inspection Inspect variables in the Debug panels and in the console.
Inline values You can set 'debug.inlineValues': true to see variable values inline in the debugger. This feature is experimental and disabled by default. Task Runner Auto detect tasks Select Tasks from the top-level menu, run the command Configure Tasks., then select the type of task you'd like to run. This will generate a tasks.json file with content like the following. See the Tasks for more details.