If it weighs less than a hundred pounds; I'm going to kill it with its own collar. Part of a self-defense class I took.
In the class, you were going to have to give something up... give it a place to bite. Present your non-dominant arm and let the dog have the meaty part of your forearm. Once it bites, grab its collar and start twisting. In no more than a few seconds you're going to have the dog fighting for its own life and it will have completely forgotten about attacking you. Killing it or not will be your choice.
Some classmates and I were talking after a few tokes and a couple beers about how a bad person could apply that knowledge. Were I of bad intent I'd show up to a place that had a dog (trust me, I'd never enter a place I hadn't scoped in advance) with my forearm wrapped in a layer of tough leather, a towel, and some duct tape. If your dog weighs less than say 50 pounds; after it takes my arm and I have my fingers under its collar I'll simply swing it against the corner of a wall, a door jamb, or against the end of the coffee table to break its back. Then I'll kill it. Or not.
In less time than it takes the gendarmes to get rolling from the local Dunkin' Donuts, I can kill your dog. Come out of your bedroom and I just may beat you to death with it.
No collar? No matter. I'll still give it my forearm. Then I'll grab its foreleg and break it. After that I'll crush its ribcage with my knees.
Your way around this? Buy an attack dog that weighs more than a hundred pounds, and never forget to take its collar off after walking it. Then hope I don't have mace or a knife, or a ball of hamburger with drano wrapped in it. Me? I'll have a gun of my own, and chances are I'll kill it with that. What kind of idiot would contemplate breaking into a house without being armed? I have a notion of who, but can't say.
Dog? I'm not afraid of your dog, and it'll be dead before the cops ever even get the call.