In previous versions of Xcode it was possible to create a key binding to delete the current line. There were different solutions and they are described for exam
Xcode
If you are a Keyboard Maestro user, just create a macro that does the following:
I assigned it to Command-D, and made it available only in Xcode.