错误线程1:断点1.1 [英] Error Thread 1: Breakpoint 1.1
问题描述
所以我得到一个线程错误线程1:我的IBAction函数中的断点1.1。代码运行没有错误,但是当我单击模拟器上的按钮时,模拟器崩溃并产生断点错误。受影响的代码是:
So I am 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 simulator, the simulator crashes and produces the breakpoint error. The affected code is:
@IBAction override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
if testoEsercizio.text == "Per iniziare premi la tv" {
var viewController : SecondoSchermo = segue.destinationViewController as SecondoSchermo
viewController.stringaponte = "SI buono"
}
else {
var viewController : SecondoSchermo = segue.destinationViewController as SecondoSchermo
viewController.stringaponte = "NON buono"
}
}
我没有太多线程错误的经验,并且试图解决这个问题有点沮丧。任何帮助表示赞赏。
I don't have much experience with thread errors and getting a bit frustrated trying to fix this problem. Any help is appreciated.
谢谢
推荐答案
打开断点编辑器在Xcode中,⌘+ 7
。从那里你可以看到开启的断点(如深蓝色所示)或关闭(浅蓝色)。我非常怀疑你的方法中设置了一个断点。
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.
术语线程1:断点1.1
是调试器断点的内部名称(我假设你是从文本的绿色条中读取这个?)。它并不一定意味着它是一个
线程错误,它只是告诉你停止它的位置。
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.
你可以按 ^ + ⌘+ Y
继续,或转到调试菜单并选择其他选项。 ⇧+⌘+ Y
将显示调试区域和一个与调试菜单操作相关的按钮栏。
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
这篇关于错误线程1:断点1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!