In order to withhold rent, you must follow the statutory guidelines and send a written request ahead of time. Did you do that?
If you did not send the written notice as required by law, then you should "Pay or Vacate."
You should continue to call law enforcement if they are threatening you and your family.
Good luck. You may wish to call a landlord/tenant lawyer to protect your rights.
Consult a landlord-tenant attorney. You may be able to get the eviction action dismissed. Pay the outstanding rent into the court registry and file an answer explaining the problems you have had with the landlord. Attach a copy of the code enforcement report and police report. All of this should be handled by an attorney but if you cannot find one you can try to do it yourself.
You are supposed to provide notice in writing but sometimes a judge will accept the code enforcement report as indication that written notice was provided regarding the repairs needed.
No attorney-client relationship is created by answering questions in this public forum. If you wish to create an attorney-client relationship, you must contact me directly and sign a representation agreement. Answers are provided based on general ideas and an answer specific to your situation would require a review of all documents.