Detecting attached debuggers is a key RASP feature. Under no circumstances should a production app allow attaching a debugger. That should be possible only during development phase of the app.
An attached debugger is a clear sign of malicious tampering with a production app.
Malwarelytics for Android is able to detect attached debuggers and terminate the app if desired by the configuration.