dotnet / dotnet/aspnetcore

HttpClient exceptions crushes the debugger when using Docker

Open
#49,885 0 comments 0 reactions 0 assignees View on GitHub
area-networking
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

### Describe the bug

Hello
Im running a simple .NET8 web app on docker, when I try to send an http request to an external service the debuger exit with the error "The debug adapter exited unexpectedly" then the debug session stops.
When downgrading to .net7 (and updating the docker image to .net 7) the exceptions are caught as expected and evrything works fine.

![error](https://i.imgur.com/tyfydIx.png)

### Expected Behavior

Debugger works and exception caught in the try catch block

### Steps To Reproduce

* clone repo: https://github.com/7amou3/TestHttpClient/tree/master
* run the docker compose and in browser: localhost:8000/api/product/getall
* the debuger crushes

### Exceptions (if any)

_No response_

### .NET Version

8 preview

### Anything else?

_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.