GetLogsPlainAsync does not capture managed .NET exception stack traces from iOS simulator
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start at SimCtl.GetLogsPlainAsync and the command construction it uses. Compare its current log query with the issue's xcrun simctl log show process-predicate example, then run the described simulator reproduction. Done means an optional process filter captures managed exception lines while preserving the existing unfiltered behavior; no test file is named in the issue.
Written by the indexing model from the issue text.
Description
Summary
SimCtl.GetLogsPlainAsync() captures system-level logs but misses managed .NET exception details (stack traces from xamarin_unhandled_exception_handler) when an app crashes on the iOS simulator.
How to reproduce
- Run a .NET MAUI app on an iOS simulator that crashes with an unhandled managed exception
- Call
SimCtl.GetLogsPlainAsync(deviceId, start: startTime)to capture the logs - The resulting log lines contain ~17K lines of OS-level noise (launchservices, containermanager, SpringBoard, etc.) but no managed exception or stack trace
Expected
The captured log should include managed exception output from the Mono runtime, which is available in the unified logging system.
What works instead
Querying the unified log directly with a process predicate captures the full managed exception:
xcrun simctl spawn <device-udid> log show \
--predicate 'process == "MyApp"' \
--style compact \
--start '2026-05-08 02:13:00'
This returns the full managed stack trace:
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Maui.Controls.Button.LayoutButton(UIButton platformButton, Button button, Rect size)
at Microsoft.Maui.Controls.Button.Microsoft.Maui.ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
at Microsoft.Maui.Platform.WrapperView.LayoutSubviews()
at UIKit.UIApplication.UIApplicationMain(...)
at MyApp.Program.Main(String[] args)
Suggestion
It would be helpful to have an option on GetLogsPlainAsync (or a new method) that filters to a specific process name using the --predicate 'process == "..."' flag, so consumers can capture process-specific logs including managed exceptions.
Something like:
var logLines = await simCtl.GetLogsPlainAsync(deviceId, start: startTime, processName: "MyApp");
Environment
- macOS 26.4.1
- .NET 10.0
- iOS Simulator 16.2
- AppleDev.Tools (latest)
- Dominant language
- C#
- Stars
- 55
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Redth/AppleDev.Tools
-
✨ Set up Copilot instructionsMay be free again @Redth claimed this 243 days ago, and no pull request is open. Open
Redth/AppleDev.Tools#21 · 1 reaction · 2 assignees ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Redth/AppleDev.Tools#12 · 1 comment ·
All issues in Redth/AppleDev.Tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
area:frontend bug FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1989 ·
Maintainers usually reply within 1 day
-
[Bug]: Missing extensions in Agent Card capabilities in v0.3 compat modePossibly taken @hwanders claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
a2aproject/a2a-dotnet#514 · 1 comment ·
Maintainers usually reply within 2 days
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
VS Code
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AlamoEngine-Tools/pg-starwarsgame-lsp#207 ·
Maintainers usually reply within 1 day