The debugger does not show IUKit.UIControl from sender variable


When i run the the bugger with the break point activated in badMethod () the sender variable does not have the IUKit.UIControl :frowning:… instead…

It seems like the property has been changed by baseUIControl :confused:


I had the exact same problem, but found a fix.

In the ViewController class, make sure your @IBAction func buttonTapped {…} and func badMethod() {…} are after the two override funcs.

This wasn’t explained in the book, but just change that around and the Variables View behaves like it should. The viewDidLoad() must instantiate something that formats the Variables View before the breakpoint.


I found that after clicking “step over”, or on subsequent runs of the app, that the issue resolved itself and the sender variable updated to contain the contents as described on page 167.

Oddly enough, if I restart Xcode and the iPhone simulator, the same issue comes up again.


Step-over, and rerun - This worked for me.
I already had the routines in the order proposed by doge when the problem occurred.