Revert "Removing duplicate command logic"

This reverts commit 0325c51c33f018bc4287857f445f73ba8ca26b21.
Extracting xctool creation to handle debug config