Our team seriously need some help with the following problem that we are facing as it is preventing us from debugging some of the code inside dispatch_async block.
Hope I will get some help or suggestions on what to do next.
The problem we faced is as below:
We recently hit a strange problem where in Xcode 6, we are not able to break within the dispatch_async block.
- (void)viewDidLoad {
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
dispatch_async(queue, ^{
BOOL setRtn = TRUE; //<- break point is set here but never break
//call to function
BOOL setFn = some_function();
});
}
- (BOOL) some_function()
{
BOOL test = YES; <- break point set here, breakpoint break!
return test;
}
What happens is that when we set a breakpoint within any line in the dispatch_async block, the code never breaks and the break point never works.
However, if we set the breakpoint within the function that is called by the dispatch_async block, the breakpoint works!
Is anyone else facing the same problem?
We are using Xcode 6.1 and is working on IOS8.1
Please help, have been going crazy trying to solve this problem for days.