I'm using something like this command for a while now for debugging GNRC. Usually, I just patch it into the application I'm using it with, but I think there is a benefit to also provide it to RIOT upstream properly.