Debugging Android Auto As A Developer

In order to debug Android Auto

cd ~/Library/Android/sdk
./platform-tools/adb forward tcp:5277 tcp:5277
./extras/google/auto/desktop-head-unit

On your phone/emulator, turn on debugging then in Android Auto

Settings -> Start head unit server

Reference: