Elektrine lite

← Feed

@cocoafrog@hachyderm.io

Post #2637539

2026-02-17 14:11 UTC

@ktoso@mastodon.social @cocoaphony@mastodon.social @ole@chaos.social you can’t *stop* in Instruments so the „when is 'currently'“ is the main issue I think. Other than that, iirc, Instruments captures backtraces when the task is paused/resumed so that info should be available. If you care what a running task is doing, add Time Profiler to the mix. It will sample the threads, but from the task view you can determine which thread a task was running on and then use Time Profiler to check what this task was doing. It‘s quite a different perspective than a debugger. It‘s usually not as helpful to fix logic bugs in code as stopping with the debugger is. But if the question is a performance question like „why does this take so long“ or „what is this doing all this time“ it should be a good tool to answer thar.

Replies (1)

  • @cocoaphony@mastodon.social 2026-02-17 14:28

    @cocoafrog@hachyderm.io @ktoso@mastodon.social @ole@chaos.social Absolutely; it works well for performance. This particular issue was deadlock (*), either due to a Task exiting when it shouldn't, or a Task not honoring cancellation, and not exiting when it should. In Kotlin, coroutines generally can be debugged similarly to threads. In Swift, when things go wrong, there's not really any way to inspect the system. (*) yes, I'm playing loose with the meaning of "deadlock" but the app stops doing what it should.

    Open ##2637540