Skip to content

Debugging test from test explorer fails #1922

@captainsafia

Description

@captainsafia

Type: Bug

Issue Description

When attempting to launch a test to debug from VS Code, the debugger fails to attach successfully with an error.

Steps to Reproduce

  1. Clone https://github.com/dotnet/aspire
  2. Run ./build.sh
  3. Run ./start-code.sh
  4. Place breakpoint on test case.
  5. Select debug from test explorer.

Expected Behavior

Tests should run. Debugger should attach. Breakpoint should be hit.

Actual Behavior

Tests fail to launch. Debugger crashes (?).

Logs

Test run output

/Users/captainsafia/.vscode/extensions/ms-dotnettools.csharp-2.72.27-darwin-arm64/
.debugger/arm64/vsdbg --interpreter=vscode --connection=/var/folders/51/y8hh4h5n2373q
pg5cj2cwrj40000gn/T/CoreFxPipe_vsdbg-ui-ef99653f8f7f445bb56899e92d62416d
xUnit.net v3 Microsoft.Testing.Platform Runner v2.0.0+229879b765 (64-bit .NET 8.0.13)

Diagnostic file (level 'Information' with async flush): /Users/captainsafia/git/aspire/acr-resource/artifacts/bin/Aspire.Hosting.Azure.Tests/Debug/net8.0/Log/log_250411030717409.diag
Connecting to client host '127.0.0.1' port '51847'

Diagnostic file

2025-04-11T03:07:17.4165280+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Version: 1.6.3+5354e77dc47f233239dfddf6d2be620b9e14b171
2025-04-11T03:07:17.4246630+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Logging mode: asynchronous
2025-04-11T03:07:17.4273180+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Logging level: Information
2025-04-11T03:07:17.4273220+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION CreateBuilderAsync entry time: 03:07:17.338
2025-04-11T03:07:17.4331160+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION PID: 21410
2025-04-11T03:07:17.4334210+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Runtime information: osx-arm64 - .NET 8.0.13
2025-04-11T03:07:17.4335110+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Runtime location: /Users/captainsafia/git/aspire/acr-resource/.dotnet/shared/Microsoft.NETCore.App/8.0.13/System.Private.CoreLib.dll
2025-04-11T03:07:17.4336630+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION IsDynamicCodeSupported: True
2025-04-11T03:07:17.4336680+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Test module: /Users/captainsafia/git/aspire/acr-resource/artifacts/bin/Aspire.Hosting.Azure.Tests/Debug/net8.0/Aspire.Hosting.Azure.Tests.dll
2025-04-11T03:07:17.4341220+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION Command line arguments: '--server --diagnostic --diagnostic-verbosity Information --diagnostic-output-directory "/Users/captainsafia/git/aspire/acr-resource/artifacts/bin/Aspire.Hosting.Azure.Tests/Debug/net8.0/Log" --client-port 51847'
2025-04-11T03:07:17.4420530+00:00 Microsoft.Testing.Platform.Builder.TestApplication INFORMATION TESTINGPLATFORM_DEFAULT_HANG_TIMEOUT: ''
2025-04-11T03:07:17.4600940+00:00 Microsoft.Testing.Platform.Hosts.TestHostBuilder INFORMATION Setting RegisterEnvironmentVariablesConfigurationSource: 'True'
2025-04-11T03:07:17.4684070+00:00 Microsoft.Testing.Platform.Hosts.TestHostBuilder INFORMATION Setting PlatformExitProcessOnUnhandledException: 'False', config file: False environment variable:  VSTest mode: False

Environment information

VSCode version: 1.99.0
C# Extension: 2.72.27
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 9.0.200 Commit: 90e8b202f2 Workload version: 9.0.200-manifests.b4a8049f MSBuild version: 17.13.8+cbc39bea8

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.4
OS Platform: Darwin
RID: osx-arm64
Base Path: /Users/captainsafia/git/aspire/acr-resource/.dotnet/sdk/9.0.200/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.2
Architecture: arm64
Commit: 80aa709f5d

.NET SDKs installed:
9.0.200 [/Users/captainsafia/git/aspire/acr-resource/.dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.13 [/Users/captainsafia/git/aspire/acr-resource/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [/Users/captainsafia/git/aspire/acr-resource/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.13 [/Users/captainsafia/git/aspire/acr-resource/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [/Users/captainsafia/git/aspire/acr-resource/.dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
DOTNET_ROOT [/Users/captainsafia/git/aspire/acr-resource/.dotnet]

global.json file:
Not found

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

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

Visual Studio Code Extensions
Extension Author Version Folder Name
azure-api-center apidev 1.0.1 apidev.azure-api-center-1.0.1
azure-dev ms-azuretools 0.8.4 ms-azuretools.azure-dev-0.8.4
azure-repos ms-vscode 0.40.0 ms-vscode.azure-repos-0.40.0
catppuccin-vsc Catppuccin 3.17.0 catppuccin.catppuccin-vsc-3.17.0
code-spell-checker streetsidesoftware 4.0.45 streetsidesoftware.code-spell-checker-4.0.45
codespaces GitHub 1.17.3 github.codespaces-1.17.3
codetour vsls-contrib 0.0.59 vsls-contrib.codetour-0.0.59
copilot GitHub 1.301.0 github.copilot-1.301.0
copilot-chat GitHub 0.26.3 github.copilot-chat-0.26.3
csdevkit ms-dotnettools 1.18.23 ms-dotnettools.csdevkit-1.18.23-darwin-arm64
csharp ms-dotnettools 2.72.27 ms-dotnettools.csharp-2.72.27-darwin-arm64
docs-build docsmsft 0.4.6 docsmsft.docs-build-0.4.6
EditorConfig EditorConfig 0.17.2 editorconfig.editorconfig-0.17.2
github-vscode-theme GitHub 6.3.5 github.github-vscode-theme-6.3.5
go golang 0.46.1 golang.go-0.46.1
hexeditor ms-vscode 1.11.1 ms-vscode.hexeditor-1.11.1
ilspy-vscode icsharpcode 0.20.0 icsharpcode.ilspy-vscode-0.20.0
indent-one-space usernamehw 1.0.0 usernamehw.indent-one-space-1.0.0
jupyter-keymap ms-toolsai 1.1.2 ms-toolsai.jupyter-keymap-1.1.2
jupyter-renderers ms-toolsai 1.1.0 ms-toolsai.jupyter-renderers-1.1.0
mokka Demenskiy 2.0.5 demenskiy.mokka-2.0.5
night-owl sdras 2.1.1 sdras.night-owl-2.1.1
nord-visual-studio-code arcticicestudio 0.19.0 arcticicestudio.nord-visual-studio-code-0.19.0
powershell ms-vscode 2025.0.0 ms-vscode.powershell-2025.0.0
remote-containers ms-vscode-remote 0.411.0 ms-vscode-remote.remote-containers-0.411.0
remote-repositories ms-vscode 0.42.0 ms-vscode.remote-repositories-0.42.0
remote-wsl ms-vscode-remote 0.99.0 ms-vscode-remote.remote-wsl-0.99.0
remotehub GitHub 0.64.0 github.remotehub-0.64.0
rest-client humao 0.25.1 humao.rest-client-0.25.1
symbols miguelsolorio 0.0.22 miguelsolorio.symbols-0.0.22
theme-dracula dracula-theme 2.25.1 dracula-theme.theme-dracula-2.25.1
vscode-azurefunctions ms-azuretools 1.17.1 ms-azuretools.vscode-azurefunctions-1.17.1
vscode-azureresourcegroups ms-azuretools 0.10.9 ms-azuretools.vscode-azureresourcegroups-0.10.9
vscode-bicep ms-azuretools 0.34.44 ms-azuretools.vscode-bicep-0.34.44
vscode-dotnet-runtime ms-dotnettools 2.3.2 ms-dotnettools.vscode-dotnet-runtime-2.3.2
vscode-github-actions github 0.27.1 github.vscode-github-actions-0.27.1
vscode-icons vscode-icons-team 12.12.0 vscode-icons-team.vscode-icons-12.12.0
vscode-jupyter-cell-tags ms-toolsai 0.1.9 ms-toolsai.vscode-jupyter-cell-tags-0.1.9
vscode-jupyter-slideshow ms-toolsai 0.1.6 ms-toolsai.vscode-jupyter-slideshow-0.1.6
vscode-pull-request-github GitHub 0.108.0 github.vscode-pull-request-github-0.108.0
vscode-xml redhat 0.28.1 redhat.vscode-xml-0.28.1-darwin-arm64
vscode-yaml redhat 1.17.0 redhat.vscode-yaml-1.17.0
vscodeintellicode-csharp ms-dotnettools 2.2.3 ms-dotnettools.vscodeintellicode-csharp-2.2.3-darwin-arm64
vsliveshare ms-vsliveshare 1.0.5948 ms-vsliveshare.vsliveshare-1.0.5948
vsliveshare-pack ms-vsliveshare 0.4.0 ms-vsliveshare.vsliveshare-pack-0.4.0

Extension version: 2.72.27
VS Code version: Code 1.99.0 (4437686ffebaf200fa4a6e6e67f735f3edf24ada, 2025-04-02T21:35:19.530Z)
OS version: Darwin arm64 24.4.0
Modes:

System Info
Item Value
CPUs Apple M2 Max (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 16, 14, 10
Memory (System) 64.00GB (2.37GB free)
Process Argv . --crash-reporter-id 564dfdb0-e8e3-47c2-81f4-4214e191431e
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

Labels

area-aspireIssues impacting .NET Aspire plansarea-debuggingarea-testTest discovery, execution, debuggingarea-testing-platformIssues related to Testing Platform and Code CoveragebugSomething isn't workingmacMacOS

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions