Our team seriously needs help with the following problem that we are facing, as this prevents us from debugging part of the code inside the dispatch_async block.
I hope that I will receive help or suggestions on what to do next.
The problem we are facing is as follows:
We recently encountered some strange problem when in Xcode 6 we cannot break in 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;
BOOL setFn = some_function();
});
}
- (BOOL) some_function()
{
BOOL test = YES; <- break point set here, breakpoint break!
return test;
}
What happens when we set a breakpoint on any line in the dispatch_async block, the code never breaks and the breakpoint never works.
However, if we set a breakpoint in the function that is called by the dispatch_async block, the breakpoint works!
Does anyone else face the same problem?
Xcode 6.1 IOS8.1
, , , .