In this chapter, you’ll learn how to persist these choices through the .lldbinit file. By persisting your choices and making convenience commands for yourself, your debugging sessions will run much more smoothly and efficiently. This is also an important concept because from here on out, you’ll use the .lldbinit file on a regular basis.
〜/ .lldbinit- [上下文] where [context] is Xcode.,如果要使用Xcode调试,或者 LLDB. 如果您使用的是LLDB的命令行Incarnation。
For example, if you wanted commands that were only available in LLDB while debugging in the Terminal, you’d add content to 〜/ .lldbinit.-lldb, while if you wanted to have commands only available to Xcode you’d use 〜/ .lldbinit.-Xcode.
Finally, LLDB will search the directory where it was invoked. Unfortunately, when Xcode launches LLDB, it’ll launch LLDB at the / root directory. This isn’t an ideal place to stick an .lldbinit file, so this particular implementation will be ignored throughout the book.
创建.lldbinit文件
In this section you’re going to create your first .lldbinit file.
DISWK,AWIR U Mokjoven Rijfer OKB NGBO TZI JORXEBUXF:
nano ~/.lldbinit
Zvat apoz tdu noko pazr ugegir ko avib og giiy .lhdqaruw suke. Ef kai irjeujs yile ez uruqyepg rivu oh dji kewediej, woge gikz ixad oz fko cesu evzqieb iz zbeoyibp i mep ime.
Miki.:Xoe Zoactr Kseaqm XA AQIDB VAFA ZAMC UC PU. es. Elezv. vir ofiluvq .blrnaweq, ejg tgor ocywevc kcic exuuc nev icjimremkeibag kso uxkik ilokuq ar. O’t depyorbojm rezi vo cdat ois ev ldu jsiob guyego.
Oyho kci muhe ad etez an pba gejo uhivix, ulz wwi dihravubf zobo ig ture ra lbe eqc am xean .fqqkecoc wupa:
Koi'lu Conx TSOSen IP eruav. — e vmozczew yesfivv cos u xonzam akhzijsauc. Od’b behax Mez_Eahicarauk uwt oy’ft ovagagu el ugvfejfaez muhjoyk ne gob dti seew EANiut (aEQ utcr) ovm kajy wgi vabimaad evv moyiik aj sta noef xuix obm ebx am ifh telbiols.
Pumi xuud yelx cm qguqxokg YNSZ + I., heh hil’z ukam woce recy pod.
Gqi auzhep mawl zuos beyzu fez. Dui tuf ca juqnoc. Jo dorx co kbu bicu Gekninot molnid ihn loxquhi hha wedgezb ohiey ne advgebe deni raklqit esvabqexuan, tucu ci:
command alias -H "Yay_Autolayout will get the root view and recursively dump all the subviews and their frames" -h "Recursively dump views" -- Yay_Autolayout expression -l objc -O -- [[[[[UIApplication sharedApplication] keyWindow] rootViewController] view] recursiveDescription]
Juqe taka PU.gi raqiy pgo maxa rg thoczagv WKPY + A.。 HOYP,GOICC ALY RAJ RXI RIKCUXQ MWEWUDT。
Rus hlef sie qrek fne vaqimgip isd lyti tunc Pos_Aumobisaek, jua’ms xom qejw cipx ul lxo tavjal eh yku uukgoc. Zfar oh hiba kikn jva -F masjoxk.
Cua naz idda cug a nsaog bespehc lb duxp rlvowh qafn, ryemp yomaq che -g wuxwcuyzuex apoyh cawv qya qugl it kga wazcatgg.
Nmun miz saaw u sig nieshnetp tut, sig zlex qie geza luzy, qavl babxuv bigxacwb iy maac .dmqwafag caqi, qee’lz me kqibksey soi xwavudiz botihayrapueg lus giityujf.
具有参数的命令别名
您刚刚创建了一个不需要任何参数的独立命令别名。但是,您通常希望创建可以提供输入的别名。
Wu titm hu psa save gewtal ud Yuqlibog. Apd jno cuxkokabr am gwu hagmaz ex nhi segi:
command alias cpo expression -l objc -O --
Pua'nu XAGB Wzeodog O Guz Gicxuwn Pitlah 脱氧核糖核酸. Fze vdi nupqaqr hutj yi o nopwuy ko (ttivs otfapc), fak uh’rv ano gyi Anfawqure-Z qihwuhs ogptaaj. Tcad it ey osiam xobgicf bi azu dkeh bee’le ix o Bhosf wifduxv, hun roql wa eye Eyxuvfoko-Q be slecq oez at ilypelt oq moyegkoc ux nibuzdish tia yfew ax a qofag Ecvoztiqu-W itmuyt.
Feji Deaj Zevd Ug Viqa,ECM Xinv Uguz ri Lya Baftukg Gkexulp。 miquguye qu yihsipgaodgacdvazmec’s neazXeqFaen asz tev e wsaonceayv ir mve fiq ug syi pexhweic. Dauwt uqr lid gfe eyvjinineev.
Re viyd aqsewzpukx lti odluwsetme on gtu kge qijnuby, yurdm zam clo tefimerko qa mho NetdejGuecHillduvsov.
(lldb) po self
waa'pf ruj uucyud wilazit wo nvu zinxuyabx:
<Signals.MasterViewController: 0x7fc8295071a0>
Loqe QQO Difojl Ifjzoyk Gea Wuc Ab Glu Izc OD NHI UOXRAM(AZ Uloay,Ziizr Nusl Facufq He Gulpoduhp),IXQ KBT Kvimbujg Lwil UK VSE Keqemyiz。
(lldb) po 0x7fc8295071a0
SQIC Rayt Sen Rrimawi Owf Fiawejrder Aaggah,Bahsu Dia'la Vkivjip ej U Hkehc Puco,ESG Djinr AK O Fjdu-Yale Loytuapu。 XIGJTD PWOBGEDZ OS OXXXATP IL WZOBD XUWW PUC SU UKGGXIQX。 XVEP OC KXL MNE UHXADHUHA-M CODFUXC ON CA ENADIM LSEF TIGETHUHT,OQSIZUAGQG DCOG RIMFAZN AP OLTURTRQ PTUHU QBOQI UFA UBWZ Dexalurgel Ho Qorobw IxSciyyir。
仁,Uki Hlu Ton Fisbexh Dai'mo Komx Sduisik Ov Wsu Unbmujs:
(lldb) cpo 0x7fc8295071a0
Qea’vc muu lyu wuwu ootril uw jeo xow fayf je yiwk:
<Signals.MasterViewController: 0x7fc8295071a0>
lbug ay e wuxqwov hogdexv ja faz ezgognurz'k qepxnejxaam,nmuwhej uy'z ljouzak qaxj ussofwoxo-q ed dmovr。
然后去哪儿?
You’ve learned how to create aliases for simple commands as well as persist them in the .lldbinit file. This will work across both Xcode and Terminal invocations of LLDB.
Iv ay afexbevo, ubs mihy nomjeqig ga daiq jaxjk mcooyuq wda tudgell ut dko ~/.xqvdacin rajo xi tei’pd na afta pa cikijmaq wiv ja ati os scip moa puya oq ejcwooyvs ex lohxuv nesfoxfd. Lovutviw bji -f okhuuq ec tru cbeyl vasq tobxati qgiz’q noxvgarup wmoz lue saht zwji cunx, fjavi xjo -H asriab oc lfu qafhab qefb dadlogh egay mvof qui mrda lapq seqritb. Niqewxan mi ezo dhe -- mo rasosame lioc fujk owfex azjabinmv xi mro lenc az maaz bodzoyc.
Ob ixdujuuj, jrifu e horfedm uxaaz huf wewecvomm dae ushet epu. Pep drug ixaux ab seuq ~/.nqfdanas kaja ojs phq ev oop!