Xcode indexer's build process should be exposed to the UI

Originator:jalkut
Number:rdar://11230506 Date Originated:11-Apr-2012 05:20 PM
Status:Open Resolved:
Product:Developer Tools Product Version:4.3.2
Classification:Serious Bug Reproducible:Always
 
11-Apr-2012 05:20 PM Daniel Jalkut:
Often when I start to notice funky things going on with my Xcode projects, either certain content is not indexed as expected, or Xcode re-indexes my sources every time I launch, it is traceable to an index-time error that, currently, I have to jump through several hoops to zero in on and solve:

1. Set the IDEIndexingClangInvocationLogLevel to e.g. 3. (most people don't even know about this defaults value.
2. Open Xcode for my project and allow it to index the sources.
3. Examine the console log, searching for "error:"
4. Unlimit the search scope to examine the "IDEIndexingClangOperation" above the error.
5. Make sense of the failure, fix it, quit, and reopen Xcode.

I had special reason to learn about the indexing process in Xcode and figure out how to troubleshoot and fix these kinds of issues. Most users don't even know about the failures on this level, and the failures in indexing can waterfall into failures in many other areas of the app, adding to the perception that Xcode is buggy or unstable.

It would be great if Xcode elevated the indexing process to the UI and was able to issue warnings when indexing fails, as well as including complete indexer logs in the log navigator. On top of logged tasks like "Build," "Archive," "Debug," and "Test," I would like to see an Index item where I could peruse the compiler preprocess and compile steps that were used by Xcode to create the index for the workspace.

Currently when people complain about vague issues with Xcode, I often start by asking if they "have heard of IDEIndexingClangInvocationLogLevel". We're off to a terrible start with that. How great would it be if I could just ask, "well, does Xcode show you indexing errors?"

Comments

Duped as 11302067

Use syslog

Note that you can use syslog to grep the console with context, e.g.: 'syslog -C | grep -B 5 IDEIndexingClangOperation' (or however many lines you want; I still use Xcode 3...)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!