Skip to content

vsdbg crashes on iOS during startup #3296

Description

@SotoiGhost

Describe the issue

Debugging a .NET MAUI iOS app on a physical device crashes vsdbg-ui silently, with no error surfaced in the Debug Console, Output panel, or Developer Tools console. The debug session simply dies right after WillFinishLaunching() returns, while the app is still alive and running on the device.

It seems that the issue is related to the Just My Code stuff. The .ips crash report shows a SIGSEGV / EXC_BAD_ACCESS (KERN_INVALID_ADDRESS at 0x38) on the DBI-Callback thread:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000038
 
Thread 24 Crashed:: DBI-Callback
0   libmonomscordbi.dylib         	       0x12787f078 CordbFunction::GetClass(CordbClass**) + 496
1   libmonomscordbi.dylib         	       0x12787ffa4 CordbFunction::GetJMCStatus(int*) + 44
2   libmonomscordbi.dylib         	       0x1278696c4 Connection::ProcessPacketInternal(MdbgProtBuffer*) + 2080
3   libmonomscordbi.dylib         	       0x12786ae68 Connection::ProcessPacketFromQueue() + 88
4   libmonomscordbi.dylib         	       0x127866958 debugger_thread(void*) + 384
5   libmonomscordbi.dylib         	       0x127929010 CorUnix::CPalThread::ThreadEntry(void*) + 352
6   libsystem_pthread.dylib       	       0x18c54dc58 _pthread_start + 136
7   libsystem_pthread.dylib       	       0x18c548c1c thread_start + 8

The fault is a null/invalid pointer dereference at offset 0x38 inside CordbFunction::GetClass, called from GetJMCStatus.

Debugging works fine on a small/new MAUI iOS project, but consistently crashes on our production app right after WillFinishLaunching() returns and the app starts constructing its object graph.

Collect logs

Here's the vsdbg crash report: vsdbg-ui-2026-07-09-143043.ips.zip

Steps to reproduce

  1. Open a MAUI iOS project whose startup path constructs a large number of classes/objects in quick succession
  2. Use the default MAUI debug configuration:
   {
       "version": "0.2.0",
       "configurations": [
           {
               "name": ".NET MAUI",
               "type": "maui",
               "request": "launch",
               "preLaunchTask": "maui: Build"
           }
       ]
   }
  1. Start debugging on a physical iOS device.
  2. Observe that the app launches, logs proceed up to WillFinishLaunching(), and the debug session then dies with no visible error in VS Code.

Expected behavior

Be able to debug an iOS application

Environment information

  • MacBook Pro M4 Pro
  • macOS 26.5.2 (25F84)
  • .NET MAUI extension v1.16.88
  • C# Dev Kit extension v3.20.199
  • C# extension v2.140.9
  • dotnet v10.0.300
  • dotnet iOS workload v10.0.300.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions