Police say around 1:50 p.m. Monday 27-year-old Officer Jared Davis was on patrol in the 500 block of East Lincoln Highway.
The video shows a man running towards the car and throwing the large rock smashing the windshield.
Officer Davis maneuvered his car a little bit forward.
"He proceeds to try to pull the vehicle, notices in the rearview mirror this person is actually running towards his vehicle so he tries to give a little more distance between himself and the suspect. He gets out of the vehicle and the suspect attacks him," Coatesville Police Lt. Jim Audette said.
Police say the suspect, identified as 29-year-old Eric Watson, a Jamaican immigrant, tried to strike Officer Davis on the head with the large rock. Other officers responded.
One of them, a detective, was struck in the chest during the scuffle and suffered a broken sternum. He remains at Paoli Hospital.
"Our officers showed great restraint by subduing this gentleman, by using less lethal force. They did use the taser on the gentleman," Audette said.
Police released the surveillance video Monday night.
During his arraignment, Watson cursed at the judge and told her to lock him up, throw away the key, and deport him back to Jamaica. He told the judge he has been homeless for the last four years in Coatesville.
Officers in Coatesville have not seen any attacks on them until now.
"We're in a heightened level of awareness. Up until this point we really haven't experienced anything here specifically in Coatesville, but this is an example of not letting your guard down," Audette said.
Bail has been set at $100,000.