Chapter 3. Simple Active Debugging
The Next Step
In Chapter 2, we got the Linrg
command line tool to build without errors and used the Xcode debugger passively to track down and eliminate an early crashing bug. Let’s run our tool again and see how it goes. Make sure that the project is built, and select Debug Executable from the Build and Go menu in the Project window’s toolbar.
Once again, we select Standard I/O Log from the Debug menu, so we can interact with Linrg
. Type some data:
1.0 2.05
nan nan nan
Well, after we enter two numbers and press Return, Linrg
does not crash. It simply prints nan nan nan
and quits. The status bar in the Debugger and Project windows says, “Debugging of Executable ‘Linrg’ ended normally.”
Something else is wrong. An ...
Get Step into Xcode Mac OS X Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.