Choose a Startup Project from the status bar menu.
Choose a Device from the status bar menu.
Debugging the mobile-debug.exe process
Open the ./src/mobile-debug/mobile-debug.sln in Visual Studio
Set the startup / debug args to --server (this tells the mobile-debug.exe process to listen on 4711 socket instead of expecting stdin/out for communication with VSCode extension)
Start debugging mobile-debug.exe
Open vscode-comet in VSCode and debug the Extension launch profile which already exists in launch.json. This will open a new instance of VSCode with the Comet extension loaded (being debugged by the first VSCode instance).
Load a valid project (ie: dotnet new maui) in the second instance of VSCode
Follow the steps in the section above (Debugging a .NET Mobile app with the Extension) to setup a launch.json for the project.
Before you start debugging, add the following setting to your launch.json: "debugServer": 4711, (this tells VSCode to connect to the 4711 socket which your mobile-debug.exe process is listening on now, as opposed to launching mobile-debug.exe directly itself and using stdio).
Start debugging your app from the second VSCode instance.
You should be able to hit breakpoints and see the VSCode instance connect to the mobile-debug.exe running process which you are debugging from Visual Studio.