Q:

call method on view from Xcode debugger

Suppose I select a UIView from the "debug view hierarchy" in the Xcode debugger. I can print its description; it looks something like this:
Printing description of $17:
<MyView: 0x7fc6a451c030; frame = (0 0; 375 270); layer = <CALayer: 0x608000029700>>

That's nice, but what I really want to do is call [myView myMethod] and print the result. In this particular case, myMethod returns an NSString, but I imagine that won't always be true.
I've read Calling methods from Xcode Debugger?, but it does not appear to help for my case, because myView is not self.

A:

You can set the language to Swift in LLDB (the console)
(lldb) settings set target.language swift

Add a breakPoint in the class where MyView belongs, and in a scope where you're sure that is it is already instantiated.
Launch the app, and when the breakpoint is reached:
type po (print object) followed by the name of your view
(lldb) po $myView

if you want more details use p (short for print): (lldb) p myView

Call your method on the view preceded by e or expr(short for expression) :
(lldb) expr $myView.myMethod()

To see changes in the UI call this
(lldb) expr CATransaction.flush()

For more, here is the reference for lldb commands.

You could also use the memory address, given after printing the description of your UI element, and cast that to a usable type:
(lldb) expr -- import UIKit
(lldb) expr -- let $myView = unsafeBitCast(0x7fc6a451c030, to: MyView.self)
(lldb) expr $myView.myMethod()
//Or if you'd like to create a variable with that result:
(lldb) expr let $string = $myView.myMethod()
(lldb) po $string

