Instruments can't find the source code for selected symbol

Hi, I use Xcode Instruments to Profile my app, but I don't know why Instruments can not find the right source code path, like the screensh ot shows, the path is wrong, what is ? it looks like a placeholder, is xcode forgetting to replace this placeholder with real file name?

anyone know how to fix this? thank you in advance

Replies

Hi,

Some symbols are generated by compiler and doesn't have a source code. In this case Instruments can show a disassembly instructions only. You can switch to disassembly view by clicking Options menu on the the top right of the Source Viewer and select "Disassembly".

  • I've got a similar problem in my dev environment - MacOS 13.1 / Xcode 14.1 - and Instruments is unable to locate source code for ANY of my projects. I pared it down to the simplest of presumed-good tasks - I followed a Kodeco / Ray Wenderlich tutorial on Instruments in SwiftUI - but same problem. Curiously, the profile view in Instruments DOES see the function definitions, but when I double-click on one of the lines - I get this: "Error: Can't find source code for selected symbol"

Add a Comment

I had the same vexing problem and remembered that often this is due to macOS caching. Since for example it will work for new projects.

  1. Removed all Xcode caches ~/Library/Developer/Xcode/DerivedData/
  2. Rebooted, I also suspect a log out/log in will do.
  3. Rebuild and profiled my app and the source is there, tada.
  • I tried those steps, but no tada for me 😞. Same problem still.

Add a Comment

Havin the same issue