Alexander, who lives two doors down, allegedly entered the house through a first-floor bathroom window and removed an Xbox console, a Wii console, cash, and a laptop, which he placed outside in a yard.
Police allege he reentered the house at least once, went into an upstairs bedroom, and was grabbing an iPhone when a man asleep in the room woke up and chased him down the stairs.
Alexander, who legally dropped Gosnell as his last name, allegedly grabbed a bayonet that was inside the house and threatened the occupant and another roommate. A third roommate emerged with a gun and ordered Alexander to stop, police said.
The roommate, who had a license to carry the gun, then shot Alexander, police said. The suspect fled the house and collapsed outside.
The three men, all in their mid-20s, were described by police as a student from the University of Pennsylvania, a student from Temple University, and a recent graduate of Drexel University.
Alexander's mother, Pearl Gosnell, heard the commotion and came outside to see her wounded son. She reportedly went through her son's pockets and tried to return belongings to the burglary victims.
Kermit Gosnell is serving three consecutive life terms after being convicted of murder for killing fetuses born alive and viable during illegal late-term abortions.
Inquirer staff writer Joseph A. Slobodzian contributed to this article.