Skip to content

VS Code debug run session start times out with very long environment variable #5475

Open
@GabrielLetourneau

Description

@GabrielLetourneau

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In WSL, when I try to debug the Aspire starter project in a VS Code that I launched with a big (30k characters) environment variable in context, projects fail to start.

I get the following in VS Code debug console:

fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      timeout of 120 seconds exceeded waiting for the IDE to start a run session; you can set the DCP_IDE_REQUEST_TIMEOUT_SECONDS environment variable to override this timeout (in seconds)	{"Executable": {"name":"apiservice-rtqjs6rfus"}, "Reconciliation": 2, "error": "Put \"https://localhost:38693/run_session?api-version=2024-04-23\": context deadline exceeded"}
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler: Error: timeout of 120 seconds exceeded waiting for the IDE to start a run session; you can set the DCP_IDE_REQUEST_TIMEOUT_SECONDS environment variable to override this timeout (in seconds)	{"Executable": {"name":"apiservice-rtqjs6rfus"}, "Reconciliation": 2, "error": "Put \"https://localhost:38693/run_session?api-version=2024-04-23\": context deadline exceeded"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler: Error: timeout of 120 seconds exceeded waiting for the IDE to start a run session; you can set the DCP_IDE_REQUEST_TIMEOUT_SECONDS environment variable to override this timeout (in seconds)	{"Executable": {"name":"webfrontend-jjet74s3eo"}, "Reconciliation": 5, "error": "Put \"https://localhost:38693/run_session?api-version=2024-04-23\": context deadline exceeded"}
      timeout of 120 seconds exceeded waiting for the IDE to start a run session; you can set the DCP_IDE_REQUEST_TIMEOUT_SECONDS environment variable to override this timeout (in seconds)	{"Executable": {"name":"webfrontend-jjet74s3eo"}, "Reconciliation": 5, "error": "Put \"https://localhost:38693/run_session?api-version=2024-04-23\": context deadline exceeded"}

Dashboard works. Same project runs fine when launched with dotnet run.

Expected Behavior

VS Code debugging of project resource should work even when long environment variables are set.

Steps To Reproduce

In WSL:

mkdir test
cd test
dotnet new aspire-starter
export AAA=`printf '%*s' 30000 | tr ' ' 'A'`
code .

… then press F5.

Exceptions (if any)

No response

.NET Version info

.NET SDK:
Version: 8.0.108
Commit: 665a05cea7
Workload version: 8.0.100-manifests.a22b3d1f

Runtime Environment:
OS Name: ubuntu
OS Version: 24.04
OS Platform: Linux
RID: ubuntu.24.04-x64
Base Path: /usr/lib/dotnet/sdk/8.0.108/

.NET workloads installed:
Workload version: 8.0.100-manifests.a22b3d1f
[aspire]
Installation Source: SDK 8.0.100
Manifest Version: 8.1.0/8.0.100
Manifest Path: /home/gabriel/.dotnet/sdk-manifests/8.0.100/microsoft.net.sdk.aspire/8.1.0/WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5

.NET SDKs installed:
8.0.108 [/usr/lib/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.8 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Anything else?

$ code --version
1.92.2
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
x64

ms-dotnettools.csdevkit: v1.9.55
ms-dotnettools.csharp: v2.39.29

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationvs-codeIssues related to vs code tooling for aspire

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions