How to debug after ionic run?

Hi guys.
First question, how I can set up emulator for command ‘ionic run’, for example if I want to test my app in Android 5.1 or 6 version?
And the second, when I run a command ‘ionic run’, I saw an emulator with android and my app, but I need to debug. How I can do this?
Thank you

P.S. Maybe I can read about it in some articles, maybe some links has in this case?