jjzjj

ios - Swift 3 和 lldb : Print frame of UIView, 给定十六进制地址

调试iOS目标、Swift3、Xcode8.2、lldb-360.1.68我想打印一个UIView的frame,我在之前的断点处获取了它的地址。这是我最好的镜头,但结果令人失望:(lldb)expr-lobjc-O--NSStringFromRect((CGRect)([(UIView*)0x7a241b30frame]))error:useofundeclaredidentifier'CGRect'谢谢! 最佳答案 如果你在快速调试器中,你可以使用unsafeBitCast将指针转换为类型。pounsafeBitCast(0x7a

swift - LLDB 不会在 Swift 中创建便利变量

在objective-c项目中,此命令运行良好。但是在Swift中,(lldb)exprunsignedint$foo=5error::1:4:error:consecutivestatementsonalinemustbeseparatedby';'int$foo=5^;我该如何解决这个问题? 最佳答案 表达式解析器将编译器的解析器用于当前帧的语言。大概你在Swift框架中停止了,所以你必须使用正确的Swift语法。您的ObjC示例的快速等效项是:(lldb)exprvar$foo:Int=10或者因为Swift会进行类型推断,你

swift - 使用 Swift 和 lldb 设置符号断点

使用Swift时如何在lldb中设置符号断点?例如,有时我使用:(lldb)bset-F'-[UIView(AdditionalLayoutSupport)updateConstraintsIfNeeded]'但这不再有效:Breakpoint2:nolocations(pending).WARNING:Unabletoresolvebreakpointtoanyactuallocations.我也试过(lldb)bset-F'UIView.updateConstraintsIfNeeded()'(lldb)bset-F'UIView.updateConstraintsIfNeeded

xcode - 如何交互地玩 Xcode lldb swift repl 中的对象?

假设我有一个小程序,涉及从数据库中选取文档:leterrorDatabase=NSError(domain:"dk.myproject.couchbase",code:0,userInfo:nil)letrev=database.existingDocumentWithID("_design/"+designDocName)//inxcodeIsetabreakpointhereassert(rev!=nil)ifrev==nil{promise.failure(errorDatabase)}然后我插入一个断点,运行程序然后可以做:(lldb)porev0x00007fad21df61

swift - 如何在 Xcode 6 调试器中查看 Swift "let"常量的值

当我在Xcode6的调试器中停止时,如何查看使用let声明的本地Swift常量的值?如果我在Xcode6中创建一个全新的Swift项目,并将以下两行添加到应用委托(delegate)中的application(_:didFinishLaunchingWithOptions:)中:letsomeConstant=5varsomeVariable=6...然后运行应用程序并在这些行之后立即中断,这是我在调试器的变量View中看到的:为什么变量显示它的值,而常量不显示?(为什么常量列出两次?)如果在LLDB控制台中,我在someConstant(所有都正确显示了someVariable的值)

swift 错误 : failed to get module 'My_App' from AST context

我使用的是Swift3、Xcode8.1、CocoaPods1.1.1。运行podupdate后,每次我尝试使用Xcode的lldb控制台-它都会打印错误。例如,poself输出:SharedSwiftstateforMyApphasdevelopedfatalerrorsandisbeingdiscarded.REPLdefinitionsandpersistentnames/typeswillbelost.warning:SwifterrorinmoduleMyApp.Debuginfofromthismodulewillbeunavailableinthedebugger.err

ios - ___lldb_unnamed_function 在符号化的崩溃日志中

我在iPhoneOS7.0.4上生成了一个崩溃日志。我有相应的.app和.dSYM文件。当我用Xcode5符号化崩溃日志时,它会显示如下内容:Thread0Crashed:0MyProject0x001df98a___lldb_unnamed_function6108$$MyProject+421MyProject0x001e0c49___lldb_unnamed_function6119$$MyProject+92MyProject0x002928d5___lldb_unnamed_function8439$$MyProject+133MyProject0x0027fa1f___ll

ios - ___lldb_unnamed_function 在符号化的崩溃日志中

我在iPhoneOS7.0.4上生成了一个崩溃日志。我有相应的.app和.dSYM文件。当我用Xcode5符号化崩溃日志时,它会显示如下内容:Thread0Crashed:0MyProject0x001df98a___lldb_unnamed_function6108$$MyProject+421MyProject0x001e0c49___lldb_unnamed_function6119$$MyProject+92MyProject0x002928d5___lldb_unnamed_function8439$$MyProject+133MyProject0x0027fa1f___ll

ios - 我可以调试从 IPA 存档安装的 iOS 应用程序吗?

我的应用程序有一些问题,只有当我临时安装它时才会重现,但如果我只是从Xcode运行应用程序就不会重现。我想调试这个问题,但到目前为止我没有任何运气。我正在使用Xcode5.1.1。这是我所做的:1)GotoProduct->Scheme->EditScheme->ArchiveandsetbuildconfigurationtoDebug.2)CodesigningidentityissettoiPhoneDeveloper.3)GenerateDebugSymbolsissettoYes.4)GotoProduct->Archiveandafteritisarchived,click

ios - 我可以调试从 IPA 存档安装的 iOS 应用程序吗?

我的应用程序有一些问题,只有当我临时安装它时才会重现,但如果我只是从Xcode运行应用程序就不会重现。我想调试这个问题,但到目前为止我没有任何运气。我正在使用Xcode5.1.1。这是我所做的:1)GotoProduct->Scheme->EditScheme->ArchiveandsetbuildconfigurationtoDebug.2)CodesigningidentityissettoiPhoneDeveloper.3)GenerateDebugSymbolsissettoYes.4)GotoProduct->Archiveandafteritisarchived,click