'Attach lldb to iPhone from command line

While attaching lldb to iPhone works from within Xcode. It is flaky at times. I wonder if it is because XCode has some additional checks before attaching to a process in iPhone. I'd like to debug an iPhone app from command line. lldb has some tutorial that suggest using platform select but that command is unsuccessful in even connecting.

$ (lldb) platform select remote-ios
  Platform: remote-ios
 Connected: no

Am I missing something?

This question has been asked earlier but has no correct answers:



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source