Quote:
Originally Posted by bodalal
no i didn't, i do not know how to !
|
It's really easy. I assume you're using XCode? Right click in the gutter to the left of your code, and choose add breakpoint. Do this on the first line of the function you want to debug.
Then, making sure the enable breakpoints option is set, and that you've chosen the debug build of your code (in the drop-down near the top left), click the Build and Debug button.
Then bring up the debugger. I can't remember off hand which one of the menu headings its under, just look through until you find it.
Then do whatever should cause your code to be run, and make sure that it's stopped at your breakpoint*. You can now step through your code line-by-line using the buttons in the debugger, and see what each of the variables are set to in the watch window, or by hovering your mouse over the variable of interest.
This should help you identify the problem.
* - if it doesn't get triggered, your problem is most likely you're not calling your code.