I am trying to debug our project that appiles Swift Concurrency by using Swift Concurrency Instruments. But Swift Concurrency Instruments seems not work on our project.
Task {
print("async call")
await someAsyncFunction()
}
On the above code, I could check that print works well by using stdout/stderr panel, but I couldn't check that Task also works well because there were no records on Swift Tasks panel.
But I could check that Swift Concurrency Instruments works well on the small simple sample project.
Our project has been maintained for a long time, so I wonder are there any settings that be able to enable Swift Concurrency Instruments, or not.
A couple of thoughts:
Support varies by OS version. E.g., iOS 14 simulator doesn’t support concurrency instrumentation, but iOS 16.x does. So confirm the OS version on the device being profiled.
Are you using Cocoapods? Are you overriding “excluded architectures”? I found that may inhibit the Swift concurrency instrumentation. Are you seeing the problem on both simulators and physical devices?
If that’s not the issue, make a copy of your project, rip out all code/frameworks, and reduce it down to code equivalent to the “small simple sample project” and see if it works. That will confirm whether it is code related or project related. Keep going through, making your stripped down project more and more like the sample project. I know that’s not an answer, but it is my SOP for identifying culprits of problems like this.