Confront privately. If they're a friend, you owe them a real shot to listen and change before turning it into a public performance.
Yeah, and going public first basically forces them to defend their ego instead of actually hearing you. Private gives them room to drop the armor.