Reputation: 10245
I am wondering if there is an option in xcode that will let you debug a variable to see if it's being used in your code anywhere?
I find sometimes I make changes to my code, then I look at all of my synthesised variables and I'm just not positive that they are being used.. I don't mind going through my code and checking but I thought it would be more productive if their was a function that would help me do this quicker?
Dose anyone know of such a thing?
Upvotes: 3
Views: 1417
Reputation: 52738
If you switch the compiler to LLVM/GCC
or just LLVM
, then run "Analyze" (CMD+SHIFT+I I think, might be CMD+SHIFT+J) it will put a warning next to any unused variables/ivars/properties.
Upvotes: 2
Reputation: 518
Product -> Analyze will also show variables that are not read, which sometimes can capture more unused variables.
Upvotes: 3
Reputation: 264
You can set the Unused parameter warnings
in the Build Settings of your project. Just search "Unused" when looking for the option.
Upvotes: 8