Thanks for the update
Step-by-Step MAUI Debugging Fix
1. Configure launchSettings.json
- Open
launchSettings.json
- Add the following:
{
"profiles": {
"MyApp": {
"commandName": "Project",
"remoteDebugEnabled": true,
"remoteDebugMachine": "DEVICE_IP"
}
}
}
- Replace
DEVICE_IP
with the actual IPv4 address of the target device (useipconfig
to find it)
2. Set up the remote debugger
- On the target device:
- Install the exact matching version of Visual Studio Remote Tools
- Run
msvsmon.exe
as Administrator- Use this command:
msvsmon /noauth /anyuser /timeout:30000
- On your development machine:
- Disable Hot Reload in Visual Studio: Tools > Options > Debugging > .NET MAUI
- Delete
bin
,obj
, and.vs
folders to clean the project
- Delete
- Disable Hot Reload in Visual Studio: Tools > Options > Debugging > .NET MAUI
- Use this command:
- Run
- Install the exact matching version of Visual Studio Remote Tools
3. Configure firewall and network
- Temporarily disable firewalls and antivirus on both machines
- Open UDP port 11000 and TCP port 4024
- Make sure both devices are on the same subnet (e.g., 192.168.1.x)
- Test connection using PowerShell:
Test-NetConnection DEVICE_IP -Port 4024
4. Adjust project settings
- Open your
.csproj
file and ensure:
<PropertyGroup>
<ApplicationId>com.company.myapp</ApplicationId>
<WindowsPackageType>MSIX</WindowsPackageType>
</PropertyGroup>
- Make sure ApplicationId is under 50 characters and has no underscores
- Uninstall the app from the target device
- Run
dotnet clean
- Build with
dotnet build -c Debug
- Deploy using Visual Studio with x64 platform selected
5. Validate environment
- Check remote debugger logs at:
C:\Users\[user]\AppData\Local\Temp\RemoteDebugger
- Enable detailed Visual Studio logging:
devenv.exe /log output.log
- Try deploying a blank MAUI app to isolate the issue
6. Troubleshoot specific errors
- For error
0x80131c08
:- Delete
Properties/launchSettings.json
- Recreate the debug profile via project properties
- If the app crashes before
InitializeComponent()
:- Check logs:
- Windows: Event Viewer > Windows Logs > Application - Android: `adb logcat` - iOS: Xcode Devices window console - For connection timeouts: - Use a wired connection instead of Wi-Fi - On iOS, disable Wireless Debugging in bundle signing options
- Check logs:
- Delete
7. Final checklist
- Remote Tools version matches Visual Studio
-
msvsmon
is running with no authentication - Firewalls are disabled during testing
- Correct IP is set in
remoteDebugMachine
- App is uninstalled from the target device
- ApplicationId is valid (no underscores)
-
bin
andobj
folders are deleted before rebuild
8. If issues persist
- Share the full error message from Visual Studio’s Output window
- Include logs from the Remote Debugger folder.
If stuck, run the Remote Debugging Troubleshooter:
' msvsmon /prepcomputer` on target device (requires admin)
Let me know if the issue persists after following these steps. I’ll be happy to assist further if needed. If the issue has been resolved, kindly mark the response as answered