I\'m getting a thread error Thread 1: Breakpoint 1.1
in my IBAction
function. The code runs without error, but when I click the button on the simul
To solve this issue you should follow this instructions.
1- Go to Product in the toolbar.
2- Then go to Scheme.
3- And go to Edit scheme.
4- Then click on Run(Debug).
5- in Run(Debug) there is Arguments Passed On launch just click on + then put this value on it (-v)
6- Close.
Here's the two steps to solve this:
Remove break point, by going to DEBUG
and DEACTIVATE ALL BREAK POINT
Then, go to Main.Storyboard
, right click on the area highlighted in red:
Check that the yellow sign is present or not. If present then remove this. Code will run successfully. App will not crash.
Have you accidentally added a breakpoint to your code? If so, program will run up until that point and then stop.
Check whether there are any blue arrows linked to some part of your program which mark a breakpoint.
Open the breakpoint editor in Xcode with ⌘ + 7
. From there you can see the breakpoints that are on (as indicated by dark blue) or off (with light blue). I highly suspect that you have a breakpoint set in your method.
The term Thread 1: Breakpoint 1.1
is the debugger's internal name for the breakpoint (I Assume you're reading this from the green bar of text?). It doesn't necessarily mean it is a
threading error, it's just telling you where it stopped.
You can press ^ + ⌘ + Y
to Continue, or go to the Debug Menu and select other options. ⇧ + ⌘ + Y
will bring up the Debug area and a bar of buttons which correlate to the Debug Menu's actions.
HTH
If you are having this problem, the easiest way to solve this issue is to click on the debug option in the tool menu at the top of the screen and you will then you find the option "deactivate breakpoints".
You can click on the (dark blue) sign, and the green message will go away. And the next part of your code will be accessible from simulation or else.