.lldbinit doesn't work in xCode

社会主义新天地 提交于 2020-01-25 02:57:08

问题


.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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!