microsoft / microsoft/vscode-dotnettools

vsdbg crashes on iOS during startup

Open
#3,296 2 comments 0 reactions 2 assignees View on GitHub

@mauroa is already working on this.

Since Aug 4, 2026.

bug
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.