1

I can't see any output to the console in xCode after printing a string "Button pressed", I have tested the code when the button is pressed so I am sure that the code that prints is reached. Here is the method:

func onRatingButton(button: UIButton) {
        print("Button pressed")
}

(Swift) The code is executed when a button is pressed.

This is what my console looks like:

Console

Please help if you can, thanks :)

  • Update

Thank you everyone who helped, I was apparently looking at the wrong thing :)

3
  • Can you print text from anywhere else in the code? How is this function invoked? Commented Jul 6, 2016 at 6:44
  • the screenshot is a part of the debug area, yes, but there is no console there. This is a screen with the console. Notice 2 blue buttons on the lower right part of the screen (they can be gray), you might want to play with those, particularly with the one on the right. Commented Jul 6, 2016 at 6:45
  • Thanks 4oby, that helped! Commented Jul 6, 2016 at 6:51

1 Answer 1

1

Your console is collapsed, you need to click the little icon on the right :

enter image description here

so it becomes blue :

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Cmd-Shift-C will also bring up the console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.