Search code examples
c#visual-studio-codemaui

How can I use the .NET MAUI extension for VS Code to debug on my iOS/Android devices or simulators?


I have installed the .NET MAUI extension for VS Code: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui

In addition, the C# and C# Dev Kit extensions are installed.

But I don't see a menu in Visual Studio Code where I can choose a simulator or my iOS/Android devices.

How can I debug on my iOS/Android devices or simulators in Visual Studio Code? I use macOS Sonoma on my iMac.

UPDATE:

I cannot find the curly brackets symbol { } in the bottom right corner of Visual Studio Code. Why is the curly brackets symbol missing?

Visual Studio Code picture


Solution

  • In visual studio code, after creating the MAUI project, you can click on the curly brackets symbol { } in the bottom right corner of Visual Studio Code. Here, you can change your Startup Project, change your Debug Target to anything valid emulator device on your Mac, and pin either setting to the Visual Studio Code status bar.

    For more details, you can refer to Choose your target device. enter image description here