C
C#17mo ago
oe

Debugger Breaks to External Files and Exception Handling Issue in C# .NET 8.0 with VS 2022

I am coding my project in .NET 8.0 in the new Visual Studio 2022 Preview version. Whenever there is an exception within a try catch block, for some reason, the VS debugger breaks and brings me to files which are not from my project, such as: Exception User-Unhandled: System.Net.Sockets.SocketException HResult=0x80004005 Message=The requested name is valid, but no data of the requested type was found. Source=System.Net.Sockets StackTrace: at System.Net.Sockets.SocketAsyncEventArgs.<<DnsConnectAsync>g__Core|112_0>d.MoveNext() C:\Users\FRZ\AppData\Local\SourceServer\8a3b989d075fe5e6b812cbdd0fa766804632a4fa333c1d383a1867bd743fd652\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs Not only is the exception not bringing me to my user code, but it is also breaking from within a try catch (handled exception). It should continue executing. What is going wrong, and how can I fix this?
43 Replies
reflectronic
reflectronic17mo ago
do you have "Just My Code" enabled
oe
oeOP17mo ago
Yes
oe
oeOP17mo ago
oe
oeOP17mo ago
oe
oeOP17mo ago
I am going absolutely crazy over this D:
reflectronic
reflectronic17mo ago
and, uh, it's not set in your "Break When Thrown" options either, is it
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
Same issue
oe
oeOP17mo ago
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
I think I'm gonna go with this This issue has been happening for soo long And I've cleaned the project/rebuilt so many times
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
but its in a try catch its handled
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
why would it break?
MODiX
MODiX17mo ago
TeBeCo
delete .vs/ folder possibly also bin/obj and retry
React with ❌ to remove this embed.
oe
oeOP17mo ago
oe
oeOP17mo ago
i would recheck that its handled (even tho im 100% sure)
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
but even the call stack is unreadable
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
oe
oeOP17mo ago
it was already off
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
im sure its to do with that with .net8
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
its just i have a lot of projects i will try it later
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
i was just hoping to find some setting that i could turn off
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
where do i find global.json
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
{ "sdk": { "version": "7.0.302" } }
oe
oeOP17mo ago
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
thought thats what global.json did 🤔 ok lets try anyway
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
yeah, it's good now fair enough
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
thanks (:
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
oe
oeOP17mo ago
yeah
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server