views:

138

answers:

2

I am debugging an Iphone program with the simulator in xCode and I have one last issue to resolve but I need help resolving it for the following reason: when it happens the program goes into debugging mode but no errors appear (no BAD ACCESS appears) and it does not show where the code fails. Putting some variables as global helps me to see their values to start pin pointing where the bug is but before I go into this fully I would like to know what techniques/tools you guys use to debug these situations.

If it helps Im debugging the following: I merged some code into the SpeakHere demo. The code was added in the C++ modules of the program (AQRecorder.h and .mm). I seem to have pinpointed the problem code in a function I wrote.

A: 

My favourite is always to add debugging code and log it to a file. This allows me so report any and all information I need to resolve the issue if the debugger is not working properly.

I normally control the debugging code by use of a flag which I can manipulate at run time or by the command line.

Dave
If this is a memory retain/release issue it is unlikely to help resolve the problem.
Jacob
Dave. How do you do that exactly?
Jordan
A: 

If the error is (and it probably is) a memory management issue, printing log entries is really not going to help.

I would reccomend learning how to use Instruments, and use its tools to track down the memory leak when it occurs rather than waiting until the application crashes later on.

Jacob