Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you debug a unit test in Xcode 3?
    primarykey
    data
    text
    <p>I followed Apple's <a href="http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/UnitTesting/1-Articles/CreatingTests.html%23//apple_ref/doc/uid/TP40002171-BBCBGHCJ" rel="nofollow">instructions</a> to set up Unit Testing in my project. I followed the directions for making them dependent, so the tests run with every build of my main project. This works, and when my tests pass, the application runs; when they don't, I get build errors on the lines of the unit tests that failed.</p> <p>I would like, however, to be able to step through my application code when the tests are failing, but can't get Xcode (3.2.5) configured properly. The project is a Mac project, not iOS.</p> <p>I tried the instructions <a href="http://beatworm.co.uk/blog/computers/tracing-unit-tests-with-the-xcode-3-debugger/" rel="nofollow">here</a> and <a href="http://bill.dudney.net/roller/objc/entry/5" rel="nofollow">here</a>, but execution never stopped at the breakpoints I set, neither in the the unit test code or in my application code. After following the first set of instructions, the breakpoints I set turned yellow with blue outlines, and I don't know what that meant, either. What do I need to do to step through my tests?</p> <p><strong>Update</strong></p> <p>I found another page attempting to solve this problem (<a href="http://chanson.livejournal.com/120740.html" rel="nofollow">here</a>) by adding arguments and environment variables to my main executable, but again, those didn't cause execution to stop at my breakpoints. I also noticed that my test's (copious) log statements aren't showing up in my Debugger Console, either.</p> <p>I also found out that the yellow breakpoints mean the code there can't be found at runtime. These are in my test case class, so that definitely seems to explain why those aren't firing.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload