Well I dont think there is a formal rule forbiding 3rd party candidates from debating. If I am not mistaken, I believe I heard before this past debate that a candidate has to have atleast 15% of the vote to participate. The problem is, a 3rd party candidate usually NEVER gets that much precentage, so they never get to participate.

Either way, it is sort of rigged for only the republican and democratic nominees to be in it, even if not formally. I guess you could say it is their way of preventing 3rd party candidates from getting in the debate, without formally forbidding it.