“线程1:在断点处停止”初始化NSURL对象时出错 [英] "Thread 1: stopped at breakpoint" error when initializing an NSURL object

查看:110
本文介绍了“线程1:在断点处停止”初始化NSURL对象时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注iTunes U上的斯坦福大学iOS开发课程。

I am following the Stanford University iOS development course on iTunes U.

在其中一个演示中(我一直试图遵循),有这个代码从 NSURL 加载属性列表并将其作为 NSMutableDictionary 返回。

In one of the demos (that I have been trying to follow), there is this code that loads the property list from an NSURL and returns it as NSMutableDictionary.

-(NSMutableDictionary *) words
{

    NSURL *wordsURL=[NSURL URLWithString:@"http://cs193p.stanford.edu/vocabwords.txt"];

    words=[[NSMutableDictionary dictionaryWithContentsOfURL:wordsURL] retain];


    return words;
}

应用程序已成功构建,但在运行时它会出现以下错误并获取卡住了:

The application is successfully built, but at runtime it gives the following error and gets stuck:

我无法弄清问题是什么。能帮忙吗?

I can't figure out what the problem is. Can you please help?

推荐答案

你在断点处停了下来。这是一个调试工具,而不是错误。请参阅左边距中的蓝色箭头/标签,其中行号是?将其拖走并将其放在任何位置(您将看到poof)将其删除,然后再次运行您的项目。

You're stopped at a breakpoint. That's a debugging tool, not an error. See the blue arrow/tab in the left margin, where the line numbers are? Drag that away and drop it anywhere (you'll see a "poof") to remove it, then run your project again.

您还可以通过键入 - Y 来关闭所有断点等效于菜单项Debug> Deactivate Breakpoints,或者您可以在Breakpoint Navigator中查看所有断点(点击 - 6 )。

You can also deactivate all breakpoints by typing -Y, the key equivalent for the menu item Debug>Deactivate Breakpoints, or you can view all your breakpoints in the Breakpoint Navigator (hit -6).

当执行停止时,您可以在断点处继续,方法是在控制台的调试器提示符下键入 continue

When execution stops like this, you can continue from the breakpoint, either by typing continue at the debugger prompt in the Console:

(lldb) continue

或者在调试器控件中点击播放按钮。您还可以键入 Control - - Y ,这与菜单项Debug> Continue相同。

Or hitting the "Play" button in the debugger controls. You can also type Control--Y, which is the equivalent for the menu item Debug>Continue.

这篇关于“线程1:在断点处停止”初始化NSURL对象时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆