ios-deploy can do this.
brew install node npm install -g ios-deploy ios-deploy -d -W -b path/to/foo.app
It will copy the application package to the connected device, launch the application, and start the lldb session for the application.
I just tested it right now. OSX 10.12.6, iOS 11.0.2, Xcode 9.0.1.
source share