问题
.lldbinit
was used to preload some scripts before xCode start. The goal of this file is to load some script code automatically.
Many people recommend it but it DOESN'T WORK. I know the script code is correct because it works on manual call:
command source ~/.lldbinit
Does it work no more?
I tried the following simple code in xCode 6.4:
expr @import UIKit
Any solutions except of breakpoints calling this script manually?
回答1:
The .lldbinit in your home directory is sourced in BEFORE the target you are going to debug is created. It's purpose is to set up the environment for creating that target. You want to import UIKit into the expression context being built up for execution evaluation in that target. By definition you can't do that in the ~/.lldbinit.
来源:https://stackoverflow.com/questions/31743326/lldbinit-doesnt-work-in-xcode