dotnet / dotnet/aspnetcore

JSDisconnectedException hinders debugging in Visual Studio

Open
#62,724 1 comment 1 reaction 0 assignees View on GitHub
area-blazor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

When debugging a Blazor Server application in Visual Studio, every time the browser is refreshed or the connection is interrupted, a large number of JSDisconnectedException instances are thrown internally by the framework.

Even though these exceptions do not break execution (no break on exception set), Visual Studio’s debugger still captures their call stacks as first-chance exceptions.

This results in:

Severe debugging performance degradation

Noticeable lag in the IDE during browser refreshes

A backlog of redundant exception traces in the debugger output and internal logs

This issue makes Blazor Server development and debugging cumbersome, especially during frequent UI iterations and hot reload scenarios.

### Describe the solution you'd like

Provide a way to:

Disable or suppress the capture/logging of JSDisconnectedException in Visual Studio debugger, or

Mark JSDisconnectedException as non-notifiable to the debugger by default, since it’s an expected and harmless lifecycle event in Blazor Server.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.