Thread error in IBAction while overriding prepareForSegue function

后端 未结 7 1782
死守一世寂寞
死守一世寂寞 2020-12-03 20:45

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

相关标签:
7条回答
  • 2020-12-03 20:50

    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.

    0 讨论(0)
  • 2020-12-03 20:51

    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.

    0 讨论(0)
  • 2020-12-03 21:06

    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.

    0 讨论(0)
  • 2020-12-03 21:08

    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

    enter image description here

    0 讨论(0)
  • 2020-12-03 21:10

    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".

    0 讨论(0)
  • 2020-12-03 21:11

    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.

    0 讨论(0)
提交回复
热议问题