tags:

views:

237

answers:

3

Very often, when I run my unit tests for my iPhone project, XCode feels like making the actual errors disappear from the errors and warnings group. These errors are often under the general sub-item of that group, and often when I need to read the text of the error in detail, all errors disappear and all I have left are the build warnings. Has anyone else seen this behavior and is there a way to fix it?

Edit: I forgot to mention; this seems to happen when i have errors that are not tied to any file (it says Line Location:0 in the second column of the error list). If there aren't any errors there (when generally the only errors are failed assertions) then it seems to work ok.

A: 

I haven't seen this behavior but what you describe sounds like a bug to me. You should submit it to apple.

hhafez
A: 

It's hard to follow what you're talking about. What I can deduce is that you:

  1. Build a Unit Test target
  2. See the Errors and Warnings in an item in the Build Results window
  3. Do something you don't explain to "read the text of the error in detail"
  4. See the errors disappear (from the build results window?) but the warnings remain

It would help to see a screen shot of your project when it's doing what you want, before the errors disappear, and to learn what you are doing right before they go away.

cdespinosa
I'm not doing anything, which is the problem. I think the only thing I try to do is mouse over some of the errors, and then the error list refreshes with the errors not there. I'm not sure exactly what causes the errors to disappear and reappear like that, but it makes finding issues in my tests a pain. I'll update the question with more info that i forgot to add before.
Kevlar
A: 

This is probably happening because you have multiple targets with dependencies.

One target is dependent on another (usually unit tests) and the unit tests get built and their warnings/errors show up. Then, the main target gets built and its warning/errors show up. Since they are different targets, they second batch shows up over the first batch.

Assuming this is the problem, you can see the first batch by manually changing your target temporarily.

Kailoa Kadano