Skip to content

Commit 5f6ff76

Browse files
committed
Update macOS setup
1 parent 6c77350 commit 5f6ff76

File tree

1 file changed

+84
-43
lines changed

1 file changed

+84
-43
lines changed

docs/setup/mac.md

Lines changed: 84 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,78 +11,119 @@ MetaDescription: Get Visual Studio Code up and running on Mac (macOS).
1111

1212
## Installation
1313

14+
1. [Download and install Visual Studio Code](#install-vs-code-on-macos)
15+
16+
> [!NOTE]
17+
> VS Code ships monthly releases and supports [auto-update](#updates) when a new release is available.
18+
19+
1. [Install additional components](/docs/setup/additional-components.md)
20+
21+
Install Git, Node.js, TypeScript, language runtimes, and more.
22+
23+
1. [Install VS Code extensions from the Visual Studio Marketplace](https://marketplace.visualstudio.com/VSCode)
24+
25+
Customize VS Code with themes, formatters, language extensions and debuggers for your favorite languages, and more.
26+
27+
1. [Set up AI-assisted coding with GitHub Copilot](/docs/copilot/setup-simplified.md)
28+
29+
> [!TIP]
30+
> If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for the [Copilot Free plan](https://github.com/github-copilot/signup) and get a monthly limit of completions and chat interactions.
31+
32+
1. [Get started with the VS Code tutorial](/docs/getstarted/getting-started.md)
33+
34+
Discover the user interface and key features of VS Code.
35+
36+
## Install VS Code on macOS
37+
1438
1. [Download Visual Studio Code](https://go.microsoft.com/fwlink/?LinkID=534106) for macOS.
15-
2. Open the browser's download list and locate the downloaded app or archive.
16-
3. If archive, extract the archive contents. Use double-click for some browsers or select the 'magnifying glass' icon with Safari.
17-
4. Drag `Visual Studio Code.app` to the **Applications** folder, making it available in the macOS Launchpad.
18-
5. Open VS Code from the **Applications** folder, by double clicking the icon.
19-
6. Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing **Options**, **Keep in Dock**.
2039

21-
## Launching from the command line
40+
1. Open the browser's download list and locate the downloaded app or archive.
2241

23-
You can also run VS Code from the terminal by typing 'code' after adding it to the path:
42+
1. If archive, extract the archive contents. Use double-click for some browsers or select the 'magnifying glass' icon with Safari.
2443

25-
* Launch VS Code.
26-
* Open the **Command Palette** (`kbstyle(Cmd+Shift+P)`) and type 'shell command' to find the **Shell Command: Install 'code' command in PATH** command.
44+
1. Drag `Visual Studio Code.app` to the **Applications** folder, making it available in the macOS Launchpad.
2745

28-
![macOS shell commands](images/mac/shell-command.png)
46+
1. Open VS Code from the **Applications** folder, by double clicking the icon.
2947

30-
* Restart the terminal for the new `$PATH` value to take effect. You'll be able to type 'code .' in any folder to start editing files in that folder.
48+
1. Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing **Options**, **Keep in Dock**.
3149

32-
>**Note:** If you still have the old `code` alias in your `.bash_profile` (or equivalent) from an early VS Code version, remove it and replace it by executing the **Shell Command: Install 'code' command in PATH** command.
50+
## Launch VS Code from the command line
3351

34-
### Alternative manual instructions
52+
To run VS Code from the terminal by typing `code`, add it the `$PATH` environment variable:
3553

36-
Instead of running the command above, you can manually add VS Code to your path,
37-
to do so run the following commands:
54+
### Configure the path with VS Code
3855

39-
```bash
40-
cat << EOF >> ~/.bash_profile
41-
# Add Visual Studio Code (code)
42-
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
43-
EOF
44-
```
56+
1. Launch VS Code
4557

46-
Start a new terminal to pick up your `.bash_profile` changes.
58+
1. Open the **Command Palette** (`kbstyle(Cmd+Shift+P)`), type 'shell command', and run the **Shell Command: Install 'code' command in PATH** command.
4759

48-
**Note**: The leading slash `\` is required to prevent `$PATH` from expanding during the concatenation. Remove the leading slash if you want to run the export command directly in a terminal.
60+
![macOS shell commands](images/mac/shell-command.png)
4961

50-
**Note**: Since `zsh` became the default shell in macOS Catalina, run the following commands to add VS Code to your path:
62+
1. Restart the terminal for the new `$PATH` value to take effect.
5163

52-
```zsh
53-
cat << EOF >> ~/.zprofile
54-
# Add Visual Studio Code (code)
55-
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
56-
EOF
57-
```
64+
You can now type 'code .' in any folder to start editing files in that folder.
5865

59-
## Touch Bar support
66+
> [!NOTE]
67+
> If you still have the old `code` alias in your `.bash_profile` (or equivalent) from an early VS Code version, remove it and replace it by running the **Shell Command: Install 'code' command in PATH** command.
6068
61-
Out of the box VS Code adds actions to navigate in editor history as well as the full Debug tool bar to control the debugger on your Touch Bar:
69+
### Manually configure the path
6270

63-
![macOS Touch Bar](images/mac/touchbar.gif)
71+
To manually add VS Code to your path:
6472

65-
## Mojave privacy protections
73+
1. Run the following commands:
6674

67-
After upgrading to macOS Mojave version, you may see dialogs saying "Visual Studio Code would like to access your {calendar/contacts/photos}." This is due to the new privacy protections in Mojave and is not specific to VS Code. The same dialogs may be displayed when running other applications as well. The dialog is shown once for each type of personal data and it is fine to choose **Don't Allow** since VS Code does not need access to those folders.
75+
**Zsh**:
76+
77+
```zsh
78+
cat << EOF >> ~/.zprofile
79+
# Add Visual Studio Code (code)
80+
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
81+
EOF
82+
```
83+
84+
**Bash**:
85+
86+
```bash
87+
cat << EOF >> ~/.bash_profile
88+
# Add Visual Studio Code (code)
89+
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
90+
EOF
91+
```
92+
93+
> [!NOTE]
94+
> The leading slash `\` is required to prevent `$PATH` from expanding during the concatenation. Remove the leading slash if you want to run the export command directly in a terminal.
95+
96+
1. Start a new terminal to pick up your changes.
97+
98+
You can now type 'code .' in any folder to start editing files in that folder.
6899
69100
## Updates
70101
71102
VS Code ships monthly [releases](/updates) and supports auto-update when a new release is available. If you're prompted by VS Code, accept the newest update and it will get installed (you won't need to do anything else to get the latest bits).
72103
73-
>Note: You can [disable auto-update](/docs/supporting/faq.md#how-do-i-opt-out-of-vs-code-autoupdates) if you prefer to update VS Code on your own schedule.
104+
> [!NOTE]
105+
> You can [disable auto-update](/docs/supporting/faq.md#how-do-i-opt-out-of-vs-code-autoupdates) if you prefer to update VS Code on your own schedule.
74106
75-
## Preferences menu
107+
## Touch Bar support
108+
109+
Out of the box, VS Code adds the following Touch Bar actions:
110+
111+
* To navigate in the editor history
112+
* The full Debug tool bar to control the debugger on your Touch Bar:
113+
114+
![macOS Touch Bar](images/mac/touchbar.gif)
115+
116+
## Mojave privacy protections
76117
77-
You can configure VS Code through [settings](/docs/getstarted/settings.md), [color themes](/docs/getstarted/themes.md), and [custom keybindings](/docs/getstarted/keybindings.md) available through the **File** > **Preferences** menu group.
118+
On macOS Mojave, you might see dialogs saying "Visual Studio Code would like to access your {calendar/contacts/photos}." This is due to the new privacy protections in Mojave and is not specific to VS Code. The same dialogs might be displayed when running other applications as well. The dialog is shown once for each type of personal data and it is fine to choose **Don't Allow**, since VS Code does not need access to those folders.
78119
79120
## Next steps
80121
81-
Once you have installed VS Code, these topics will help you learn more about VS Code:
122+
Once you have installed VS Code, these topics will help you learn more about it:
82123
83-
* [Additional Components](/docs/setup/additional-components.md) - Learn how to install Git, Node.js, TypeScript, and tools like Yeoman.
84-
* [User Interface](/docs/getstarted/userinterface.md) - A quick orientation around VS Code.
85-
* [User/Workspace Settings](/docs/getstarted/settings.md) - Learn how to configure VS Code to your preferences settings.
124+
* [VS Code tutorial](/docs/getstarted/getting-started.md) - A quick hands-on tour of the key features of VS Code.
125+
* [Tips and Tricks](/docs/getstarted/tips-and-tricks.md) - A collection of productivity tips for working with VS Code.
126+
* [AI-assisted coding](/docs/copilot/overview.md) - Learn about using GitHub Copilot in VS Code to help you write code faster.
86127
87128
## Common questions
88129
@@ -96,4 +137,4 @@ If VS Code doesn't update once it restarts, it might be set under quarantine by
96137
97138
### Does VS Code run on Apple silicon machines?
98139
99-
Yes, VS Code supports macOS Arm64 builds that can run on Macs with the Apple silicon chipsets. You can install the Universal build, which includes both Intel and Apple silicon builds, or one of the platform specific builds.
140+
Yes, VS Code supports macOS Arm64 builds that can run on Macs with the Apple silicon chipsets. You can install the Universal build, which includes both Intel and Apple silicon builds, or one of the platform-specific builds.

0 commit comments

Comments
 (0)