lldb cannot find iOS app running in Simulator in order to attach

陌路散爱 提交于 2019-12-11 04:47:31

问题


This is a follow-up question to How can I use Swift REPL with iOS SDK. I have an app named Venmo which is already running on a simulator:

and I can see it in the Activity Monitor:

I would like to open a Swift REPL in which can use classes defined in the Venmo project. Following the instructions in that answer, I first find the app in my DerivedData directory;

$ cd ~/Library/Developer/Xcode/DerivedData
$ find . -name '*Venmo.app'
./VenmoWorkspace-apbzqcexodswkdfenhxlkpnlmvsx/Build/Products/Debug-iphonesimulator/Venmo.app

Then I launch a standalone LLDB following https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/gdb_to_lldb_transition_guide/document/lldb-terminal-workflow-tutorial.html. However, if I try to process attach --name 'Venmo', I get an attach failed: could not find a process named Venmo error:

~/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) 

I don't understand why LLDB can't find this process, even though I see it in my Activity Monitor?

来源:https://stackoverflow.com/questions/54757906/lldb-cannot-find-ios-app-running-in-simulator-in-order-to-attach

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