Most states if someone breaks into your house you can't just kill them, you must first attempt to escape. Deadly force is only within the law if it is the absolute last result, and you better be able to prove it.
If a guy trespasses onto private property you can't just use deadly force