For anyone that is still looking for an answer, this will do the trick:
adb shell am set-debug-app PACKAGE_NAME
Alternatively, you could do it through Developer settings.
Developer settings