Description
Description
The .NET MAUI Android debugger works on the first F5 launch, but after stopping debugging, the second and subsequent F5 launches fail to attach the MonoVsDbg debugger.
The issue is reproducible with a newly created .NET MAUI template project with no application-specific code or third-party NuGet packages.
The application can run using Ctrl+F5, but I need F5 because I require breakpoints.
Environment
- OS: Windows 11
- Visual Studio: Visual Studio Community 2026 18.9.1
- .NET SDK: 10.0.400
- Workload version: 10.0.400-manifests.b0ae88bd
- .NET MAUI: 10.0.80
- Android workload: 36.1.69/10.0.100
- iOS workload: 26.5.10301/10.0.100
- MAUI Windows workload: 10.0.20/10.0.100
- Target framework: net10.0-android
- Android version: Android 16 (API 36)
- Device: Physical Android device connected via USB
- CPU architecture: arm64-v8a
- Debugger: MonoVsDbg
- Hot Reload: Disabled
Important
I initially experienced this problem in my existing MAUI application.
To rule out application-specific code, I created a completely new MAUI template project and reproduced the same problem on the same physical Android 16 device.
Therefore, the issue can be reproduced with the default MAUI template.
Steps to Reproduce
- Create a new
.NET MAUI App using the Visual Studio 2026 template.
- Target
net10.0-android.
- Connect an Android 16 physical device through USB.
- Start debugging with F5.
- The application launches successfully.
- Stop debugging.
- Start debugging again with F5.
- The second debug session fails.
- Repeat F5 again; subsequent attempts also fail.
Expected behavior
F5 → application starts → debugger attaches
After stopping:
F5 → application starts → debugger attaches again
This should continue working for every debug session.
Actual behavior
The first F5 works, but after stopping debugging, subsequent F5 attempts fail to establish the MonoVsDbg session.
Visual Studio reports:
The program 'MauiApp1.dll' has exited with code 0 (0x0).
Debug Address: 127.0.0.1
Debug Port: 8835
Debug Assets Directory: C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets;C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets\arm64-v8a
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
Starting MonoVsDbg debug session for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mauiapp1/crc64e632a077a20c694c.MainActivity"
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mauiapp1/crc64e632a077a20c694c.MainActivity }
08-23 22:57:44.801 I/nyname.mauiapp1(24572): Thread[2,tid=27410,WaitingInMainSignalCatcherLoop,Thread*=0xb4000075856ac010,peer=0x22aa020,"Signal Catcher"]: reacting to signal 3
08-23 22:57:44.801 I/nyname.mauiapp1(24572):
08-23 22:57:44.854 I/nyname.mauiapp1(24572): Wrote stack traces to tombstoned
Link to public reproduction project repository
No response
Version with bug
10.0.20
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 16
Did you find any workaround?
No response
Relevant log output
The program 'MauiApp1.dll' has exited with code 0 (0x0).
Debug Address: 127.0.0.1
Debug Port: 8835
Debug Assets Directory: C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets;C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets\arm64-v8a
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
Starting MonoVsDbg debug session for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.mauiapp1/crc64e632a077a20c694c.MainActivity"
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.companyname.mauiapp1/crc64e632a077a20c694c.MainActivity }
08-23 23:31:08.214 I/nyname.mauiapp1(30042): Thread[2,tid=4271,WaitingInMainSignalCatcherLoop,Thread*=0xb4000075856ac010,peer=0x266a020,"Signal Catcher"]: reacting to signal 3
08-23 23:31:08.214 I/nyname.mauiapp1(30042):
08-23 23:31:08.330 I/nyname.mauiapp1(30042): Wrote stack traces to tombstoned
Description
Description
The .NET MAUI Android debugger works on the first F5 launch, but after stopping debugging, the second and subsequent F5 launches fail to attach the MonoVsDbg debugger.
The issue is reproducible with a newly created .NET MAUI template project with no application-specific code or third-party NuGet packages.
The application can run using Ctrl+F5, but I need F5 because I require breakpoints.
Environment
Important
I initially experienced this problem in my existing MAUI application.
To rule out application-specific code, I created a completely new MAUI template project and reproduced the same problem on the same physical Android 16 device.
Therefore, the issue can be reproduced with the default MAUI template.
Steps to Reproduce
.NET MAUI Appusing the Visual Studio 2026 template.net10.0-android.Expected behavior
F5 → application starts → debugger attaches
After stopping:
F5 → application starts → debugger attaches again
This should continue working for every debug session.
Actual behavior
The first F5 works, but after stopping debugging, subsequent F5 attempts fail to establish the MonoVsDbg session.
Visual Studio reports:
The program 'MauiApp1.dll' has exited with code 0 (0x0).
Debug Address: 127.0.0.1
Debug Port: 8835
Debug Assets Directory: C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets;C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets\arm64-v8a
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
Starting MonoVsDbg debug session for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
08-23 22:57:44.801 I/nyname.mauiapp1(24572): Thread[2,tid=27410,WaitingInMainSignalCatcherLoop,Thread*=0xb4000075856ac010,peer=0x22aa020,"Signal Catcher"]: reacting to signal 3
08-23 22:57:44.801 I/nyname.mauiapp1(24572):
08-23 22:57:44.854 I/nyname.mauiapp1(24572): Wrote stack traces to tombstoned
Link to public reproduction project repository
No response
Version with bug
10.0.20
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 16
Did you find any workaround?
No response
Relevant log output
The program 'MauiApp1.dll' has exited with code 0 (0x0).
Debug Address: 127.0.0.1
Debug Port: 8835
Debug Assets Directory: C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets;C:\Users\Hrishikesh\source\repos\MauiApp1\obj\Debug\net10.0-android\android\assets\arm64-v8a
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
New MonoVsDbg debugger process created for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
Starting MonoVsDbg debug session for project 'C:\Users\Hrishikesh\source\repos\MauiApp1\MauiApp1.csproj'...
08-23 23:31:08.214 I/nyname.mauiapp1(30042): Thread[2,tid=4271,WaitingInMainSignalCatcherLoop,Thread*=0xb4000075856ac010,peer=0x266a020,"Signal Catcher"]: reacting to signal 3
08-23 23:31:08.214 I/nyname.mauiapp1(30042):
08-23 23:31:08.330 I/nyname.mauiapp1(30042): Wrote stack traces to tombstoned