Interesting enough I actually agree in principle with arsenico and ken. The debug button example is a weird corner case. On pretty much every smart phone you click a green call button to make a call and click a red disconnect button to disconnect. The debug button is consistent with other toggle buttons while being the reverse of a common convention. It may have been less confusing if it was a grayed out phone when off and green when connected.
I think the problem is that the "Listen for debug connections" button doesn't look like a toggle (a slider that will move back and forth). If it looks like a toggle, then showing the current state is good because the button design is saying that it will toggle away from that current state, but if it's not a toggle, the user understands button icons as signifying what will happen.
This comment being right next to this one shows the joy of designing UIs:
> I never understood why one would make a control show the state that it isn't in.
https://news.ycombinator.com/item?id=20737877