Instruments - Swift Concurrency not working

Hello, I am trying to debug Swift Concurrency codes by using Swift Concurrency Instruments. But in our project which has been maintained for a long time, Swift Concurrency Instruments seems not working.

Task {
  print("async code")
  await someAsyncFunction()
}

When I run Swift Concurrency Instruments with the above codes in our project, I could check that the print works well by checking stdout/stderr Instruments, but there are no records on Swift Concurrency Instruments.

But in the small simple sample project, I checked that Swift Concurrency Instruments works well.

Are there any settings that I need to do for the legacy project to debug Swift Concurrency?

Replies

Hi presto95,

You shouldn't have to enable any settings for this to work on an older project. The only requirement is that the device you are app is running on is at least iOS 16 / macOS 13. Can you also try to reproduce this on the latest Xcode beta? If this is reproducing for you on iOS 16 and newer and the latest Xcode beta. Can you file a feedback with the following:

  1. A sample project the demonstrates the issue.
  2. A recorded trace file with the Swift Concurrency template + stdout/stderr instruments.
  3. A sysdiagnose captured after a failed usage of the tool.

Thank you for reaching out.

- Harjas

Same here on Xcode 15.1 Brand new project. Swift Tasks in instruments is empty.

This seems only to be broken for macOS apps. Debugging an iOS app seems to work.

Tested on Sonoma.

@Harjas I submitted feedback including a sample project.

I submitted feedback including a sample project.

What was your bug number?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Same issue here. Several days ago, it works, but now, only macOS could not show the Swift Actors and Swift Tasks.

It’s hard to find the state of such issues without a bug number. Unfortunately, paxos didn’t reply to my earlier request for that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

This still seems to be a problem. Tried with an Xcode project macos command line tool template, and with a SPM exectuable target. Both show empty concurrency instruments but the time profiler is fine.