If the landlord breached and you gave proper notice under the lease and the breach was not cured, you may have a defense to the enforcment of the remainer of you lease, if I understand your question. The landlord will have to overcome your defenses in any action to sue you for the rent. But most landlords just turn over unpaid bills to collection agencies and it will be the collectors job to find a way to collect the money and then go to court if a viable claim can be made and then your defenses will come into play.
Only If and until you and I sign an Agreement for Legal Services, I am not your attorney. These answers are provided for informational and/or novelty purposes