# VS Code for Mac installeren

Volgende (in opbouw) gids overloopt hoe je Visual Studio Code kunt installeren op Mac zodat je er C# applicaties in kunt ontwikkelen.

De stappen met **(eenmalig)** achter moet je maar 1 keer doen tijdens installatie. Al de rest heb je nodig telkens je een nieuw project begint.

## Installatie en configuratie

### Installeer VS Code for Mac (eenmalig)

Volg de Installation stappen (1 tot 6) op [deze pagina](https://code.visualstudio.com/docs/setup/mac).

### Installeer C# Dev Kit extension (eenmalig)

Klik op extensions ![](/files/W4byEcY4wRRSpwDyU50c) en zoek op c#.

Installeer: ![](/files/bmWDiV2SSortnXXbBVYb)

Na installatie sluit VS Code.

### Installeer .NET 8 (eenmalig)

Surf naar [deze pagina](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).

![](/files/qTyYNySjlSIfI7o46zfA)

Download en installeer de juiste macOS installer (afhankelijk van je processortype).

### Andere output (eenmalig)

Druk command+, (komma) om naar de settings te gaan.

Ga naar Extensions-> C#-> Debugger

En pas Debug:Console instelling aan naar **externalTerminal**

![](/files/XzqPxOhMTiA1XUPolufT)

Mooi zo. Je bent klaar om C# applicaties te maken!

## Werken met VS Code

### Een nieuw project/solution aanmaken:

Command+SHIFT+P en kies .NET New Project:

![](/files/1KPQzSfHLT5zPOjFn2Ek)

Dan Console App:

![](/files/wA9SNkz3PTlLfSS00yRB)

Kies folder waar de solution moet komen.

Geef de solution een naam:

![](/files/WktefdfoUYXDLgtoJKaT)

Kies "create project":

![](/files/Z10u3GuQkyoAlCYWGw8H)

Je mag dit vertrouwen:

![](/files/COPMVcRtfeAbe3BIKqes)

In explorer (linkerzijde) zie je je project (klik ![](/files/nLk36b7ugXPzT80BWIHg) als je geen explorer balk ziet):

![](/files/wAONzl6ekuXY9Kl82kQV)

Open de Program.cs file:

![](/files/FyWAvWaCH9W23ZtYtWOq)

**OPGELET:** we moeten nog 1 ding doen voor we kunnen beginnen.

Klik met je muis op de eerste lijn code (`// See https://aka.ms/new-console-template for more information`) zodat je cursor er staat. Er zou nu aan de linkerzijde een geel lampje moeten verschijnen:

![](/files/vv8GMwHwqrRgV7CTwciL)

Klik op gele lampje en kies `Convert to program.main style program`:

![](/files/A4qSfPguA3l5oGQTxl57)

Ready to program:

![](/files/Z0wMTK8t18r77WTHEAkm)

### Code compileren en uitvoeren

Optie 1: druk op F5.

Optie 2: druk op playknop rechtsboven ![](/files/roKDbtZjcUr4R0RjCOQs)}

### Code debuggen

Zet eerst gewenste breakpoint (rode bolletje) vlak naast de lijnnummers:

![](/files/ZBHju5tVRV5A2emAGAEj)

Klik rechtsboven op het kleine pijltje naast de "play"knop:

![](/files/n0W5kejybWnFO5eNXuZM)

En kies "debug project associated with the file":


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apwt.gitbook.io/zie-scherp-scherper/appendix/mac.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
