这是here的后续问题。我有一个名为Venmo
的应用程序,该应用程序已在模拟器上运行:
How can I use Swift REPL with iOS SDK
我可以在活动监视器中看到它:
我想打开一个Swift REPL,其中可以使用Venmo
项目中定义的类。按照该答案中的说明进行操作,我首先在DerivedData
目录中找到该应用;
$ cd ~/Library/Developer/Xcode/DerivedData
$ find . -name '*Venmo.app'
./VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products/Debug-iphonesimulator/Venmo.app
然后,我在之后启动一个独立的LLDB。但是,如果我尝试process attach --name 'Venmo'
,则会收到attach failed: could not find a process named Venmo
错误:
~/L/D/X/DerivedData>
lldb ./VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products/Debug-iphonesimulator/Venmo.app
(lldb) target create "./VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products/Debug-iphonesimulator/Venmo.app"
Current executable set to './VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products/Debug-iphonesimulator/Venmo.app' (x86_64).
(lldb) process attach --name 'Venmo'
error: attach failed: could not find a process named Venmo
(lldb)
即使我在活动监视器中看到了它,我也不明白为什么LLDB无法找到该过程?