Skip to content

.NET 10 launch-mode debug hang on macOS arm64 at WebApplication.CreateBuilder (vsdbg waits indefinitely, run+attach works) #9059

@ylvict

Description

@ylvict

Type: Bug

Environment

  • OS: macOS 15.7.1 (Apple Silicon / arm64)
  • .NET SDK: 10.0.103
  • Target framework: net10.0
  • VS Code: 1.111.0
  • C# extension: ms-dotnettools.csharp 2.120.3
  • C# Dev Kit: 2.10.3
  • Debug adapter/runtime appears to be vsdbg coreclr-debug-2-90-0 (from extension runtimeDependencies URL)

Problem summary

In launch mode (coreclr, request=launch), debugging hangs during app startup around WebApplication.CreateBuilder.
The process does not continue, no further app logs appear, and debugger UI becomes effectively stuck.
In contrast, dotnet run + attach works reliably.

What I expected

F5 launch should continue through startup and hit breakpoints normally.

What actually happens

  • App prints diagnostic output before CreateBuilder.
  • It never prints diagnostic output after CreateBuilder.
  • Process appears alive but hangs indefinitely.
  • Eventually VS Code/debug session may end after timeout/manual stop.
  • No useful managed exception is surfaced to user code.

Repro pattern

This is consistently reproducible in my ASP.NET Core app when using launch mode:

  1. Start debugging with coreclr launch config.
  2. Execution reaches startup path before CreateBuilder.
  3. Hangs at or during CreateBuilder.
  4. run+attach workaround does not hang.

Collected evidence

I sampled the hung process with macOS sample.
The main thread is blocked in CoreCLR debugger suspend/wait path:

  • Debugger::FirstChanceNativeException
  • DebuggerController::DispatchPatchOrSingleStep
  • Thread::RareDisablePreemptiveGC
  • Thread::WaitSuspendEventsHelper
  • CLREventBase::WaitEx
  • _pthread_cond_wait

At the same time, stack traces also show debugger/module-load interaction paths such as:

  • Module::NotifyDebuggerLoad
  • Debugger::LoadModule

This strongly suggests a debugger/CLR handshake deadlock during launch-time module load/JIT events.

Important observations

  • Environment dump from startup does not show DOTNET_STARTUP_HOOKS injection.
  • Debugger is attached (Debugger.IsAttached=True).
  • Process parent in sample is vsdbg-ui.
  • Issue reproduces only with launch mode; run+attach is stable.

Minimal launch config shape (representative)

  • type: coreclr
  • request: launch
  • program: app dll (net10.0)
  • console: integratedTerminal
  • env includes ASPNETCORE_ENVIRONMENT / DOTNET_ENVIRONMENT
  • preLaunch build task

Temporary workaround

Use dotnet run in a background task, then attach debugger by process name.
This avoids the launch-time deadlock and works consistently.

Request

Could you confirm whether this is a known .NET 10 + vsdbg launch-mode issue on macOS arm64, and whether a newer debugger build contains a fix?
If needed, I can provide:

  • full sample output
  • full launch/tasks config
  • environment dump
  • additional traces/logging

Extension version: 2.123.34
VS Code version: Code 1.111.0 (Universal) (ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb, 2026-03-06T23:06:10Z)
OS version: Darwin arm64 24.6.0
Modes:

Logs

C# log

Details
2026-03-12 10:28:35.532 [info] Installing C# dependencies...
2026-03-12 10:28:35.532 [info] 

2026-03-12 10:28:35.532 [info] Platform: darwin, arm64

2026-03-12 10:28:35.532 [info] 

2026-03-12 10:28:35.532 [info] Downloading package 'Language server for Roslyn Copilot integration' 
2026-03-12 10:28:37.602 [info] (47 KB)
2026-03-12 10:28:37.602 [info] .......
2026-03-12 10:28:37.844 [info] .......
2026-03-12 10:28:37.849 [info] ......
2026-03-12 10:28:37.849 [info]  Done!

2026-03-12 10:28:37.850 [info] Validating download...

2026-03-12 10:28:37.850 [info] Integrity Check succeeded.

2026-03-12 10:28:37.850 [info] Installing package 'Language server for Roslyn Copilot integration'

2026-03-12 10:28:37.850 [info] 

2026-03-12 10:28:37.856 [info] Finished

2026-03-12 10:28:37.856 [info] 

2026-03-12 10:28:47.381 [info] Locating .NET runtime version 10.0.0
2026-03-12 10:28:47.793 [info] Dotnet path: /usr/local/share/dotnet/dotnet
2026-03-12 10:28:47.793 [info] Activating C# + C# Dev Kit...
2026-03-12 10:28:47.890 [info] [stdout] info: Program[0]
      Server started with process ID 83582

2026-03-12 10:28:48.800 [info] [stdout] {"pipeName":"/var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/9ca8b0e9.sock"}

2026-03-12 10:28:48.801 [info] received named pipe information from server
2026-03-12 10:28:48.801 [info] client has connected to server
2026-03-12 10:28:48.884 [info] [Program] Language server initialized
....
2026-03-12 15:01:32.668 [info] Installing C# dependencies...
2026-03-12 15:01:32.668 [info] 

2026-03-12 15:01:32.668 [info] Platform: darwin, arm64

2026-03-12 15:01:32.668 [info] 

2026-03-12 15:01:32.686 [info] Downloading package 'Language server for Roslyn Copilot integration' 
2026-03-12 15:01:35.428 [info] (47 KB)
2026-03-12 15:01:35.428 [info] .......
2026-03-12 15:01:35.428 [info] .......
2026-03-12 15:01:35.428 [info] ......
2026-03-12 15:01:35.428 [info]  Done!

2026-03-12 15:01:35.429 [info] Validating download...

2026-03-12 15:01:35.429 [info] Integrity Check succeeded.

2026-03-12 15:01:35.429 [info] Installing package 'Language server for Roslyn Copilot integration'

2026-03-12 15:01:35.429 [info] 

2026-03-12 15:01:35.665 [info] Finished

2026-03-12 15:01:35.665 [info] 

2026-03-12 15:01:35.711 [info] Locating .NET runtime version 10.0.0
2026-03-12 15:01:36.632 [info] Dotnet path: /usr/local/share/dotnet/dotnet
2026-03-12 15:01:36.632 [info] Activating C# + C# Dev Kit...
2026-03-12 15:01:37.024 [info] info: Program[0]
2026-03-12 15:01:37.024 [info]       Server started with process ID 66563
2026-03-12 15:01:38.269 [info] [Program] Language server initialized
2026-03-12 15:01:38.280 [info] [Program] Monitoring client process 65997 for exit
2026-03-12 15:01:39.698 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from ~/.vscode/extensions/ms-dotnettools.csharp-2.123.34-darwin-arm64/.roslyn/Microsoft.CodeAnalysis.LanguageServer reloading to start from /usr/local/share/dotnet/dotnet to match necessary SDK location.
2026-03-12 15:01:40.972 [warning] [textDocument/diagnostic] [LanguageServerProjectLoader] Project /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/8fda1134-909e-4766-9d96-561d48624f03/Canonical.csproj has unresolved dependencies
2026-03-12 15:01:41.471 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Successfully completed load of /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/8fda1134-909e-4766-9d96-561d48624f03/Canonical.cs
2026-03-12 15:01:41.487 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs: Running dotnet restore on /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/8fda1134-909e-4766-9d96-561d48624f03/Canonical.cs
2026-03-12 15:01:41.496 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-03-12 15:01:42.009 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Determining projects to restore...
2026-03-12 15:01:50.426 [info] Locating .NET runtime version 10.0.0
2026-03-12 15:01:51.161 [info] Dotnet path: /usr/local/share/dotnet/dotnet
2026-03-12 15:01:51.161 [info] Activating C# + C# Dev Kit...
2026-03-12 15:01:51.341 [info] info: Program[0]
2026-03-12 15:01:51.341 [info]       Server started with process ID 68657
2026-03-12 15:01:51.778 [info] [Program] Language server initialized
2026-03-12 15:01:51.807 [info] [Program] Monitoring client process 67678 for exit
2026-03-12 15:01:53.187 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from ~/.vscode/extensions/ms-dotnettools.csharp-2.123.34-darwin-arm64/.roslyn/Microsoft.CodeAnalysis.LanguageServer reloading to start from /usr/local/share/dotnet/dotnet to match necessary SDK location.
2026-03-12 15:01:54.123 [warning] [textDocument/diagnostic] [LanguageServerProjectLoader] Project /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/c67f3fc8-849b-4500-b398-9799780f7c5e/Canonical.csproj has unresolved dependencies
2026-03-12 15:01:54.177 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Successfully completed load of /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/c67f3fc8-849b-4500-b398-9799780f7c5e/Canonical.cs
2026-03-12 15:01:54.182 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs: Running dotnet restore on /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/c67f3fc8-849b-4500-b398-9799780f7c5e/Canonical.cs
2026-03-12 15:01:54.184 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-03-12 15:01:54.756 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Determining projects to restore...
2026-03-12 15:01:55.199 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Restored /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/c67f3fc8-849b-4500-b398-9799780f7c5e/Canonical.csproj (in 152 ms).
2026-03-12 15:01:55.519 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restore complete
2026-03-12 15:01:55.520 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:02.3825509
2026-03-12 15:01:57.542 [info] [serviceBroker/connect] [WorkspaceProjectFactoryService] Project 
...
2026-03-12 15:03:10.134 [info] Locating .NET runtime version 10.0.0
2026-03-12 15:03:11.164 [info] Dotnet path: /usr/local/share/dotnet/dotnet
2026-03-12 15:03:11.164 [info] Activating C# + C# Dev Kit...
2026-03-12 15:03:12.985 [info] info: Program[0]
2026-03-12 15:03:12.985 [info]       Server started with process ID 71221
2026-03-12 15:03:13.080 [info] [Program] Language server initialized
2026-03-12 15:03:13.109 [info] [Program] Monitoring client process 70992 for exit
2026-03-12 15:03:14.186 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from ~/.vscode/extensions/ms-dotnettools.csharp-2.123.34-darwin-arm64/.roslyn/Microsoft.CodeAnalysis.LanguageServer reloading to start from /usr/local/share/dotnet/dotnet to match necessary SDK location.
2026-03-12 15:03:15.178 [warning] [textDocument/diagnostic] [LanguageServerProjectLoader] Project /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/7d62b521-4737-4c1d-ab40-4d7da864dc16/Canonical.csproj has unresolved dependencies
2026-03-12 15:03:15.232 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Successfully completed load of /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/7d62b521-4737-4c1d-ab40-4d7da864dc16/Canonical.cs
2026-03-12 15:03:15.241 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs: Running dotnet restore on /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/7d62b521-4737-4c1d-ab40-4d7da864dc16/Canonical.cs
2026-03-12 15:03:15.253 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-03-12 15:03:15.640 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Determining projects to restore...
2026-03-12 15:03:15.970 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Restored /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/7d62b521-4737-4c1d-ab40-4d7da864dc16/Canonical.csproj (in 124 ms).
2026-03-12 15:03:15.982 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restore complete
2026-03-12 15:03:15.997 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:01.9434797
2026-03-12 15:04:30.215 [info] Locating .NET runtime version 10.0.0
2026-03-12 15:04:32.481 [info] Dotnet path: /usr/local/share/dotnet/dotnet
2026-03-12 15:04:32.481 [info] Activating C# + C# Dev Kit...
2026-03-12 15:04:32.698 [info] info: Program[0]
2026-03-12 15:04:32.698 [info]       Server started with process ID 73859
2026-03-12 15:04:33.124 [info] [Program] Language server initialized
2026-03-12 15:04:33.131 [info] [Program] Monitoring client process 73521 for exit
2026-03-12 15:04:34.286 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] .NET BuildHost started from ~/.vscode/extensions/ms-dotnettools.csharp-2.123.34-darwin-arm64/.roslyn/Microsoft.CodeAnalysis.LanguageServer reloading to start from /usr/local/share/dotnet/dotnet to match necessary SDK location.
2026-03-12 15:04:35.185 [warning] [textDocument/diagnostic] [LanguageServerProjectLoader] Project /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/0456fab5-4853-402c-a17b-457d04cdc4c4/Canonical.csproj has unresolved dependencies
2026-03-12 15:04:35.272 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Successfully completed load of /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/0456fab5-4853-402c-a17b-457d04cdc4c4/Canonical.cs
2026-03-12 15:04:35.279 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs: Running dotnet restore on /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/0456fab5-4853-402c-a17b-457d04cdc4c4/Canonical.cs
2026-03-12 15:04:35.297 [info] [textDocument/diagnostic] [Microsoft.CodeAnalysis.LanguageServer.DotnetCliHelper] Using dotnet executable configured on the PATH
2026-03-12 15:04:35.783 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Determining projects to restore...
2026-03-12 15:04:36.137 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restoring Canonical.cs:   Restored /var/folders/14/bzkd6zjn7qx_x91xs812ts1c0000gp/T/roslyn-canonical-misc/0456fab5-4853-402c-a17b-457d04cdc4c4/Canonical.csproj (in 146 ms).
2026-03-12 15:04:36.165 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Restore complete
2026-03-12 15:04:36.181 [info] [textDocument/diagnostic] [LanguageServerProjectLoader] Completed (re)load of all projects in 00:00:02.0547206

C# LSP Trace Logs log

Details

Environment Information

VSCode version: 1.111.0
C# Extension: 2.123.34
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 10.0.200 Commit: 40cd698e5c Workload version: 10.0.200-manifests.c7707153 MSBuild version: 18.3.0-release-26119-122+40cd698e5

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.7
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/10.0.200/

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
Version: 10.0.4
Architecture: arm64
Commit: 80d3e14f5e

.NET SDKs installed:
10.0.200 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_CLI_UI_LANGUAGE [en-US]
DOTNET_MULTILEVEL_LOOKUP [0]

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Details ....
C# Settings
Setting Value
preferCSharpExtension false
compilerDiagnosticScope openFiles
analyzerDiagnosticScope openFiles
enableXamlTools true
useServerGC true
System Info
Item Value
CPUs Apple M1 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M1 Pro, Version 15.7.1 (Build 24G231))], DRIVER_VENDOR=Apple, DRIVER_VERSION=15.7.1 ACTIVE
Machine model name: MacBookPro
Machine model version: 18.1
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 2, 5, 6
Memory (System) 32.00GB (0.60GB free)
Process Argv --crash-reporter-id 7fb6a7fb-e9b9-46c5-b45f-38dbe5c2846f
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31464701
editstats-enabled:31346257
cloudbuttont:31379625
aihoversummaries_f:31469309
3efgi100_wstrepl:31403338
56b7f661:31457055
use-responses-api:31390855
je187915:31401257
ec5jj548:31422691
cp_cls_t_966_ss:31454198
find_all_ref_in_bg_f:31469307
ge8j1254_inline_auto_hint_haiku:31431912
nes-autoexp-10:31446583
00h15499_gpt_53_codex:31464543
7a04d226_do_not_restore_last_panel_session:31438103
cp_cls_c_1081:31454833
ia-use-proxy-models-svc:31452481
a43f0574:31442827
e9c30283:31461165
test_treatment2:31471001
nes-conv-2-3:31474331
g_63ac8346:31467999
idci7584:31464702
edit_mode_hidden:31461530
864ei723_large_tool_results_to_disk:31460878
showingstats:31471631
i54ji102:31458073
55364912:31471672
7ef87755:31458076
nes-extended-on:31455476
chat:31457767
8hig5102:31473806
jdddd261:31472041
nes-rcnt-prop:31471616
8a2c4887_5_3_codex_prompt:31475326
cpptoolson-v2:31475363
f0268191:31471593
hover1:31474145
thinking_c:31471065
c3257622:31473910
noiconchange:31473925
nes-notsn-1:31475122

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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