Thread 1: breakpoint 1.1 2.1

How do I solve?

This is my code:

import UIKit

class ViewController: UIViewController {

  var flipCount = 0 {
    didSet {
      flipCountLabel.text = "Flips: \(flipCount)"
    }
  }
   
   
  @IBOutlet weak var flipCountLabel: UILabel!
   
// in this area appears the Thread 1: breakpoint 1.1 2.1 (in the line of "flipCount += 1")

  @IBAction func touchCard( sender: UIButton) {
    flipCount += 1
    flipCard(withEmoji: "👻", on: sender)
  }
   
   
  @IBAction func touchSecondCard(
sender: UIButton) {
    flipCount += 1
    flipCard(withEmoji: "🎃", on: sender)
  }
   
  func flipCard(withEmoji emoji: String, on button: UIButton) {
    if button.currentTitle == emoji {
      button.setTitle("", for: UIControl.State.normal)
      button.backgroundColor = colorLiteral(red: 1, green: 0.5763723254, blue: 0, alpha: 1)
    } else {
      button.setTitle(emoji, for: UIControl.State.normal)
      button.backgroundColor = colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
    }
  }
}

How do I solve?

Better clarify solve what?

This is my code:

Please use Code block feature of this site (icon <>) when showing your code.

I cannot get any messages like Thread 1: breakpoint 1.1 1.2 using the exact code you have shown.
So the problem might exist in somewhere else in your project.
  • Are you sure you have not added any breakpoint?

  • Have really connected IBOutlets and IBActions correctly?

Better try again creating a brand-new project, and copy the code, editing the storyboard again.
Are you sure you have not set a direct breakpoint there ?
It occurred to others:
https://developer.apple.com/forums/thread/39283
or
https ://forums.raywenderlich. com/t/thread-1-breakpoint-1-1-2-1/41631

Or have you defined a breakpoint elsewhere ?
Can you resume execution after breakpoint ?

You should also try an option- clean build folder, in case.

In anycase, look at the breakpoint panel at the left of Xcode window to see all the breakpoints you have set, and remove all.
Thread 1: breakpoint 1.1 2.1
 
 
Q