Should you give the real reasons when you resign?

Announcing to a boss that you are resigning is always a bit tricky. When the decision is motivated by the mismanagement of said boss or, more broadly, a toxic work environment, the dilemma arises as to whether one should give the “real reasons” for leaving.