Instruments doesn't show the source code


#1

I know it’s a general issue, but it’s driving me mad, and perhaps one of you already had the issue and can point me out what I’m doing wrong…

I recently updated everything (Xcode & intruments 7.3 on 10.11 ), and the time profiler won’t show anymore the source code.

Here is what I do :

  • open the juceDemo project in xcode
  • I’m in debug, without optimizations, with symbol generated and not stripped, and DWARF with dSYM File.
  • I build and run, then Xcode menu->open dev tool -> instruments -> Time Profiler
  • attach to the running demo app
  • record a bit
  • double click on a juce function call in the stack
    -> no source code

The weird thing is that it worked once (and only once) after I relaunched xcode. Not sure why, and I can’t reproduce that.
Do you guys think about something that I should check or do differently?


#2

I’d love to know this as well.


#3

Hmmm can’t figure this one out. Even when selecting the debug ‘configuration’ from the profiling scheme, I still can’t view source code.


#4

Is it a JUCE issue, or does it happen with non-JUCE projects as well? Sounds like it could be an Xcode/Instruments issue.


#5

I just created a simple console app, changed the Build Configuration on the Profile scheme to Debug, and when I run the time profiler, I can double click my function, see the source code, and see how many times everything has been called.


#6

Actually it works fine to display the source for the files that are ‘directly’ in the “source” folder.
But it does not work for the files that are in the different modules.
For those, instruments fails to find them.
For instance, it fails to find :

…/…/…/…/modules/juce_opengl/opengl/juce_OpenGLContext.cpp

(the path appears when you hover the red ‘!’, cf screenshot)

I don’t know how projucer and xcode manage folders/groups/relative paths, but maybe that rings a bell?


#7

I’m having the same problem, can’t see my source code, just the function names.

I’ve checked every flag for generating a symbol table, ensuring the binary isn’t stripped etc. but Instruments refuses to display the source code.

I’ve confirmed that this is a JUCE/XCode build problem by building another (small) stand-alone app: I’m able to profile that and see every line of code.

But for my JUCE plug-in some of the icons are showing warnings and the Xcode icon is greyed out:

Pointers appreciated!!
Thank you.


#8

Some more info: File/Symbols… shows my AUv3Synth with a green icon and it knows where the DWARF DSym file is located.

It looks like it can’t find the source code itself maybe?


#9

If I set the Scheme for the Profiler to use a Debug build, I can see the source code in Instruments.
So looks like it’s some difference between the Debug & Release schemes or Project settings.