May 2014
Intermediate to advanced
624 pages
19h 43m
English
What’s going on? You need to see what the parser is doing on those lines. Fortunately, the debugger works in unit tests. Set a breakpoint at the start of -[SimpleCSVFile run:error:], and run just testTooManyFieldsError by clicking the red diamond next to its name in the Test navigator or as it appears in the margin of the definition of the method.
The breakpoint at run:error: fires, but look at the stack trace in the Debug navigator: The call came from PRAppDelegate via PRGame. This isn’t the test run; because you’re running the test in the full context of Passer Rating, you’re seeing the parsing run from the initialization of the app. Click the Continue button in the debugger bar, and wait for the second call to run:error: ...