microsoft / microsoft/vscode-dotnettools

[WebToolsE2E] [Green] Run a project, VS Code debugger throws "Exception: StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete..."

Open
#3,368 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

REGRESSION INFO: Using C# DevKit May Prerelease 7 version 3.27.196 will repro this issue https://github.com/microsoft/vscode-dotnettools/issues/3351

INSTALL STEPS

  1. OS: windows x64
  2. Install the SDK 10.0.302
  3. Install VS Code insiders - 1.132.0
  4. Install internal prerelease C# 2.147.94
  5. Install internal prerelease C#devkit 3.27.234

REPRO STEPS

  1. Open vs code > Create .NET Project > Console App > NET 10 > Create
  2. Right click xxx.csproj >Build, build successfully.
  3. Right click xxx.csproj > Debug > Start new Instance

Note:

  • Repro with ASP.NET Core Web App (Razor Pages) and Blazor Web App projects
  • This issue still reproduces for start without debugging

ACTUAL
There is an exception when debugging

Image

Exception: StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.
at StreamJsonRpc.JsonRpc.InvokeCoreAsync(JsonRpcRequest request, Type expectedResultType, CancellationToken cancellationToken)
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList1 arguments, IReadOnlyList1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
at VsDbg.BrokeredServices.Services.HotReloadServiceSender.<>c__DisplayClass11_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at VsDbg.BrokeredServices.Services.BaseServiceSender.<>c__DisplayClass8_0.<b__0>d.MoveNext()

EXPECTED
No errors show up.

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.

Research direction

Reproduce the failure using the listed Windows, .NET 10, VS Code Insiders, C# and C# Dev Kit versions, then compare the debugger and start-without-debugging paths for the console, Razor Pages, and Blazor projects. Start with the StreamJsonRpc.ConnectionLostException stack trace and the linked regression issue; done means these project types run without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.