C
C#13mo 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
reflectronic13mo ago
do you have "Just My Code" enabled
oe
oe13mo ago
Yes
oe
oe13mo ago
oe
oe13mo ago
oe
oe13mo ago
I am going absolutely crazy over this D:
reflectronic
reflectronic13mo ago
and, uh, it's not set in your "Break When Thrown" options either, is it
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
Same issue
oe
oe13mo ago
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo 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 User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
but its in a try catch its handled
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
why would it break?
MODiX
MODiX13mo ago
TeBeCo
delete .vs/ folder possibly also bin/obj and retry
React with ❌ to remove this embed.
oe
oe13mo ago
oe
oe13mo ago
i would recheck that its handled (even tho im 100% sure)
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
but even the call stack is unreadable
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
oe
oe13mo ago
it was already off
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
im sure its to do with that with .net8
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
its just i have a lot of projects i will try it later
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
i was just hoping to find some setting that i could turn off
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
where do i find global.json
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
{ "sdk": { "version": "7.0.302" } }
oe
oe13mo ago
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
thought thats what global.json did 🤔 ok lets try anyway
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
yeah, it's good now fair enough
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
thanks (:
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
oe
oe13mo ago
yeah
Unknown User
Unknown User13mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server
More Posts
❔ ✅ Using sound in C#Could someone help me with adding a sound to my program. I'm trying to make a very basic timer which✅ Issues with method not being availableHello, I'm running latest version of .NET and latest version of EF Core and i'm trying to use bulk o✅ Content of .txt into LabelHello, I'm a beginner with C#, actualy i'm trying to past the content of a txt file into a Label or ❔ Blazor generic component "Type or namespace could not be found"Hello, In my blazor app, i have a generic component (with the use of `@typeparam T`). I have a page ❔ System.IO.FileLoadException for Microsoft.SqlServer.TypesI am working on an old project (.net 4.8) and updating the dependencies. One of these is `Microsoft.❔ blazor wont build from solution template riderhello everyone 🙂 noob here, i've been building blazor webassembly apps for a week it's been fine aASP.NET JSON conversion issuesHello, for some reason asp.net is not serializing my response object correctly, in my request I retu❔ Blazor - Event executed more than onceIt’s the first time I’m asking something on the net, so sorry if the formatting or the way the answe❔ Output from a command line app has extra characters when redirected to my applicationhere is the redirected output. It has these weird characters that are underlined. When running the c✅ Difficulty understanding Inheritance and where to use ConstructorHello people. I'm learning OOP and I've come across this problem. I'm creating a Football team creat