How to restart same program when connected to iOS device?

I’m a command line program called ios-deploy to copy my app to my iPhone and start it. Problem is it crashes before I can set anything lldb.

ios-deploy -b build_ios/HelloWorldIOS/Hello.app -d
...
libc++abi: terminating
Process 36742 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001bbddabbc libsystem_kernel.dylib`__pthread_kill + 8
(lldb) break set -E c++  
(lldb) break set -E objc
(lldb) run
error: a process is already being debugged
(lldb) kill
(lldb) run
error: the platform is not currently connected

How do I “connect” to the “platform”, and re-run with the breakpoints set?

Assuming it’s Hello.app that’s crashing, I would recommend launching your app through Xcode. It will launch you app suspended and make sure the debugger gets attached early enough in the process’ lifetime to catch crashes at launch. I don’t know how ios-deploy works but it seems to be getting that wrong. To rerun a process remotely from inside LLDB you need a platform server which is not how apps are launched on iOS and therefore not supported.

I don’t build my project with Xcode. Changing that would be a pain, but maybe I can find a way to simply launch it from Xcode after it’s built.