Every so often, when I'm debugging and stepping through a thread, Xcode pulls me into another thread (that I'm guessing is executing all the other stuff involved in setting up views etc.). the problem is that this doesn't help me, as I just want to observe the code I've written myself.
Is there any way to prevent this?
If you use "step over" you normally won't see this view, I only ever see it when I do "step into" on lines with a compound statement.
What you are seeing is not your code, but the debugger working through code it doesn't have the source to (e.g. UIKit stuff). If you hit "step out" or "step over" in this view, you will return to your code.