-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any (even wrapped at try..catch) exception at .net9-macos TFM terminates application in debug build configuration #21705
Comments
I can't reproduce any crashes. I build like this: $ dotnet build and then I run from the command line like this: $ ./bin/Debug/net9.0-macos/osx-arm64/macOSApp1.app/Contents/MacOS/macOSApp1
2024-11-29 22:10:40.716 macOSApp1[39062:3937935] Microsoft.macOS: Invalid IDE Port: -1
2024-11-29 22:10:41.397 macOSApp1[39062:3937904] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
macOSApp1.MyException: I want to get this exception at least at console output, also, i need to handle this exception - app shouldn't crash
at macOSApp1.AppDelegate.DidFinishLaunching(NSNotification notification) in [...]/dotnet-issues/macOSApp1/AppDelegate.cs:line 14 and the app doesn't crash. How are you launching the app? |
macOS projects don't work with VSCode at the moment: microsoft/vscode-dotnettools#549 Does the app work correctly if you run it without the debugger? |
Yes. But how to debug MacOS TFM by now? Rider is option, but what Microsoft offers? |
At the moment we unfortunately don't have anything except using old-fashioned Console.WriteLine debugging. |
Apple platform
macOS
Framework version
net9.0-*
Affected platform version
.net 9.0.100
Description
In debug build app instantly crashes even on expected exceptions wrapped to try-catch block.
No any information neither in debug output, nor at
AppDomain.CurrentDomain.UnhandledException
handler.App crashes without any notification what's happening. On real project it's real problem cuz it blocks development
Steps to Reproduce
Did you find any workaround?
No
Relevant logs
No response
The text was updated successfully, but these errors were encountered: