microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
225 stars 10 forks source link

[BUG] MAUI extension does not show console output for MacCatalyst #1090

Open jonathanpeppers opened 5 months ago

jonathanpeppers commented 5 months ago

Describe the Issue

If I add Console.WriteLine("Hello!") in a .NET MAUI application running on macOS, I don't see the message in VS Code's "Debug Console".

However, if I run the app such as:

$ ./bin/Debug/net8.0-maccatalyst/maccatalyst-arm64/MyApp.app/Contents/MacOS/MyApp 
2024-04-30 11:39:27.336 MyApp[28217:8881808] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
2024-04-30 11:39:33.138 MyApp[28217:8881808] Hello!

Then I see the message.

Steps To Reproduce

  1. dotnet new maui
  2. Add a Console.WriteLine("Hello!") somewhere in the app
  3. Run the project in VS Code
  4. The log message does not appear

Expected Behavior

I can see CWL messages in the "Debug Console" window.

Environment Information

phillippschmedt commented 2 weeks ago

I face the same issue when debugging .NET MAUI on iOS.