Debugging is not working in Visual Studio Community 2026: The program 'Project iOS' has exited with code 0 (0x0).

Kim Strasser 1,671 Reputation points
2025-12-03T10:43:29.6766667+00:00

My application gets installed on my iPad Air and my application launches on the device but shortly later the application gets terminated. After that I have tried to open the installed application on my device and this works. But debugging gets always terminated automatically.

I use Visual Studio Community 2026 Version 18.0.2.

INFO: Connecting to HotReload local tunnel stream from remote client... INFO: Connecting to remote HotReload local tunnel on port 50961... INFO: [iOS HotReload] Connected to "iPad von Kim" over USB on port 11000. INFO: Connecting to HotReload local tunnel stream from device... INFO: error in connection_block_invoke_2: Connection invalid INFO: 2025-12-03 11:06:55.551 ProjectiOS[707:32284] [AppCenter] ERROR: +[MSACDBStorage executeQuery:inOpenedDatabase:withValues:usingBlock:]/347 Failed to prepare SQLite statement, result=5 database is locked INFO: 2025-12-03 11:06:55.551 ProjectiOS[707:32284] [AppCenter] ERROR: -[MSACDBStorage executeQueryUsingBlock:]/129 Failed to open database with specified maximum size constraint. 2025-12-03 11:06:55.551 ProjectiOS[707:32284] [AppCenter] ERROR: +[MSACDBStorage executeQuery:inOpenedDatabase:withValues:usingBlock:]/347 Failed to prepare SQLite statement, result=5 database is locked INFO: 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() INFO: 2025-12-03 11:06:58.073 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() INFO: 2025-12-03 11:06:58.073 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() INFO: 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() INFO: 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 2025-12-03 11:06:58.074 ProjectiOS[707:32277] Warning: observer object was not disposed manually with Dispose() 'Project iOS' (Mono: Default Domain): Loaded 'C:\Users\Kim Strasser\source\repos\ProjectTestVSInsiders\ProjectiOS\ProjectiOS\bin\Debug\net10.0-ios\ios-arm64\Microsoft.Maui.Controls.HotReload.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'Project iOS' (Mono: Default Domain): Loaded 'C:\Users\Kim Strasser\source\repos\ProjectTestVSInsiders\ProjectiOS\ProjectiOS\bin\Debug\net10.0-ios\ios-arm64\Microsoft.VisualStudio.DesignTools.XamlTapContract.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. INFO: Closing HotReload local tunnel connection from device The app has been terminated. Terminating vsdbg debug process for project 'C:\Users\Kim Strasser\source\repos\ProjectTestVSInsiders\ProjectiOS\ProjectiOS\ProjectiOS.csproj'... INFO: Disposing input and output streams... INFO: Disposing input and output streams... INFO: Closing debug connection from device (USB) INFO: Disposing input and output streams... INFO: Closing debug connection from remote debugger (TCP) INFO: Disposing input and output streams... The program 'Project iOS' has exited with code 0 (0x0). INFO: The debug stream is no longer available for writing INFO: Disposing console and debugger streams... The vsdbg debug session for project 'C:\Users\Kim Strasser\source\repos\ProjectTestVSInsiders\ProjectiOS\ProjectiOS\ProjectiOS.csproj' has been stopped

Why does my application always get terminated in debug mode?

In addition, I could remove Microsoft Appcenter from my application if the problem could be related to Appcenter because I have not used Appcenter since a long time.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net10.0-ios</TargetFramework>
    <OutputType>Exe</OutputType>
    <SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
    <CodesignKey>iPhone Developer: Kim Strasser (...)</CodesignKey>
    <CodesignProvision>Project iOS Profile Development</CodesignProvision>
    <ProvisioningType>manual</ProvisioningType>
  </PropertyGroup>
  <PropertyGroup Condition="'$(TargetFramework)'=='net10.0-ios' And '$(Configuration)'=='Debug'">
  <MtouchLink>None</MtouchLink> <!--Disables linking/trimming for all assemblies, as recommended by the error message.-->
  <EnableAssemblyILStripping>False</EnableAssemblyILStripping>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
  <CreatePackage>true</CreatePackage>
  <MtouchLink>SdkOnly</MtouchLink>
  <DebugType>portable</DebugType>
  <MtouchDebug>true</MtouchDebug>
  <Optimize>true</Optimize>
  <UseLlvm>false</UseLlvm>
  <MtouchExtraArgs>--enable-detailed-crash-reports</MtouchExtraArgs>
  </PropertyGroup>

Screenshot 2025-12-03 113421

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Michael Le (WICLOUD CORPORATION) 5,930 Reputation points Microsoft External Staff Moderator
    2025-12-04T06:53:55.7033333+00:00

    Hello @Kim Strasser ,

    The crash is being caused by the [AppCenter] ERROR: ... result=5 database is locked error appearing in your logs. This indicates the AppCenter SDK is trying to write to its internal database but is being blocked, likely by the debugger itself.

    Since AppCenter was retired in March 2025, the SDK is no longer supported. You should remove the AppCenter SDK entirely. You can do this by uninstalling the Microsoft.AppCenter NuGet packages and removing the AppCenter.Start(...) initialization line from your MauiProgram.cs or AppDelegate.cs.

    As a side note, the logs also show several observer object was not disposed manually warnings. While these aren't causing the immediate crash, they indicate potential memory leaks. Once the app is stable, I recommend reviewing your code to ensure you are calling .Dispose() on objects when they are no longer needed.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.