views:

116

answers:

3

The icon in Xcode says "Build and Run". How do I change it to "Build and Debug"

I read that if you use "Build and Run" then it does extra work to optimize the code.

A: 

You need to add breakpoints to your code to change the icon for debugging

djhworld
Unless I'm misunderstanding your question, I don't see why it was necessary to downvote this answer. The icon at the top defaults to 'Build and Run', but if you add breakpoints to your code, the IDE will detect this and change the icon to 'Build and Debug'
djhworld
You don't actually *need* to do this though (not that I down-voted you - I just wanted to suggest one reason why your answer might have been considered worthy of a down-vote)
Paul R
+1  A: 

Option-click the Build and Run button and you'll have the Build and Debug button until you option-click again to change it back to Build and Run.

esqew
What's the difference if there aren't any breakpoints?
Phenom
Nothing, the question was "How do I change it [the icon in Xcode] to "Build and Debug"?"
esqew
+2  A: 

"I read that if you use "Build and Run" then it does extra work to optimize the code."

No - this is completely wrong - Release builds typically have optimisation enabled and Debug builds don't. This has nothing to do with how you run the program (i.e. Run vs Debug), it just depends on which configuration you are building.

Paul R