Is it possible to debug unit/UI tests from the command line?

The goal is to set breakpoints with some actions and log state on certain conditions for later analysis. I am thinking that it should be possible via lldb, however, I couldn't think of how to use it in combination to xcodebuild (test). Any help would be much appreciated.

Is it possible to debug unit/UI tests from the command line?
 
 
Q