Marcel Gruber
Marcel Gruber

Reputation: 7545

Why does Xcode randomly jump to memory screen / thread view / disassembly during debug?

I'm new and don't even know how to accurately describe the screen I am seeing, so hopefully this is not a duplicate question.

Generally speaking, I will be tracing through my human readable code, and for the most part it is fine, but then sometimes it will just go to this assembly-like code that seems to run forever and I need to press the play button just to get out of it.

Why does it go to this view? How is this view useful? What does it do? How to I get out of it? Thanks in advance!

weird memory screen

Upvotes: 1

Views: 186

Answers (1)

Rob Napier
Rob Napier

Reputation: 299683

This is a method you don't have source code for, so the best Xcode can show you is the disassembly (which is what this is called). Almost certainly this is inside of UIKit.

If you look at the stack frames, you'll see where you are. You can often get out of this by using "step out" a few times. It can take quite a few; watch the stack trace to see how far down the stack you are.

You can get into this state if you crashed inside of UIKit (in which case you can't really keep going; but you can click in the stack trace to get back up to your code, if any of your code is on the stack). You can also get into this state if you use "Step into instruction" (holding the Control key while clicking on the "step into" button).

Upvotes: 2

Related Questions