When my dad was living in the Netherlands, he once approached a lady in a bakery and tried to pet the small dog that was poking its head out of her purse.
“Stop!” the lady shouted, “He’s attack trained.” My dad looked down at the tiny little dog and tried not to laugh. Attack trained? What was the dog going to do? Bite his ankles?
The lady proceeded to explain that her previous dog had been kidnapped from her home, so she’d had this one attack trained. (My dad didn’t mention that he found it more likely that a burglar would dispose of the dog in order to keep it quiet rather than that someone would break into her house just to kidnap her little dog).
Of course this new, attack trained dog wasn’t likely going to be any safer from a burglar than the previous dog— just because it was so small. So while any dog can be trained to be a guard dog, there are certainly some types of dogs that make better guard dogs than others. (Hint: the little purse dog is not that type of dog).
Fortunately, there are not too many people convinced that a dog that can fit in a small purse will make a good guard dog. Unfortunately, there are a lot of people with a guard dog misconception that is potentially a lot more dangerous: the idea that the best guard dogs are very mean, very aggressive dogs.
While a very mean and very aggressive dog would certainly be frightening to a burglar, it would also be dangerous to the family— thus defeating the entire point of having a guard dog: to keep the home and the family safe. The problem with mean and aggressive dogs is that they are very unpredictable and they often direct their aggression inappropriately toward family members, friends, or harmless passersby. An unpredictable and aggressive dog is a terrifying prospect, and it gets worse the bigger the dog.
However, that doesn’t mean that big dogs are a bad idea. In fact, if you want a guard dog, you definitely need a big dog (because the burglars are not afraid of your purse dog, whether or not it’s been attack trained). The key is not to get a small dog and not to get an aggressive dog, but to get a big dog that is well-trained and generally a friendly and personable family dog. Essentially, you want a dog that will alert you to trouble, and possibly attack on command (but not of its own freewill).
There are many dog breeds that were either specifically bred or well adapted to be guard dogs and protection dogs. These dogs tend to be large and have protective tendencies. The following is— in no particular order— a list of some of the breeds that people choose for guard dogs and protection dogs:
Clearly, there are a lot of opinions out there about which dogs make good guard dogs. There are a few that come up again and again no matter who you ask (German Shepherd, Doberman Pinscher, Rottweiler, Bullmastiff), but then there are a lot of other breeds that don’t make all the lists. If you’re just looking for a dog that might deter criminals but would ultimately be a good family dog, it probably doesn’t matter all that much which of these breeds you choose. Even a shelter mutt would work just fine— as long as you make sure that the dog is properly trained and within your abilities as a dog owner.
If you’re going to welcome a big (and thus potentially dangerous) dog into your house you need to learn how to stay safe around dogs.
On some level, staying safe around dogs is common sense. Most dogs will be good to people who are good to them— i.e. if you meet a person for the first time and they offer a handshake you’re likely to shake their hand— but if you meet a person for the first time and they punch you in the face you’re somewhat likely to punch them back (whereas you definitely would not have punched the handshake-offering person).
However, dogs that have been abused and even dogs that have not been properly trained can be unpredictable and more difficult to manage and/or handle. For this reason, you should never approach a strange dog, or any dog that is not yours if the owner is not present.
If you want to keep yourself, your friends, your family, and even strangers safe around your dog, then you need to make sure your dog is properly obedience trained and that you (and everyone else that comes into contact with your dog) are always kind to the dog, so that it has no reason to distrust or dislike people.
If your dog is not properly trained, it could get you into legal trouble. Many U.S. states have a dog bite law stating that if your dog bites somebody, you are the responsible party (which I guess makes sense, since they can’t fine the dog or otherwise get the dog into legal trouble). However, if a person was provoking your dog (i.e. breaking into your house or otherwise threatening the dog or encouraging it to bite) then they are responsible for the dog bite and you are not. 
Some states have a one-bite rule, meaning that the first time your dog bites a person you are not responsible (because you didn’t know that your dog was a biter), but the second time your dog bites a person you are responsible (because since it had already bitten once, you did know).
There are also laws stating that if your dog barks an unreasonable amount, especially at night, your neighbors can file noise complaints and get you in legal trouble there.
The main take-away from these laws is that if you don’t plan to take good care of your dog and properly train and monitor it, a dog will likely cause you more harm than good and you probably shouldn’t get one. If you still think a dog is a good idea for you, then read on!
As with most things in life, it depends. It depends both on the dog and on the burglar. KGW asked inmates and former burglars some questions about their burgling days, and one inmate said that “dogs are a deal breaker... big breeds, home protectors are the best to keep people out.” Another former burglar said “Get a dog. Houses with dogs don’t get robbed. Dogs are loud, hard to spot, and bite. Doesn’t have to be an attack dog — just a barking dog. Thieves would rather save the hassle and hit the next house.”
However, there are burglars out there who are very good with dogs. Yet another former burglar said “I am amazingly good with dogs and have never had a problem with them making noise. Professional guard dogs are a problem, and I’ve never had to deal with them. If I had to, I suppose it would be to have a mild tranquilizer mixed into some steak to throw over the fence. It would depend on the situation I think.”
If you have a properly trained guard dog, it would be more difficult for a burglar to knock out your dog, but properly trained guard dogs are a lot of work and a lot of money— and they are still dogs, meaning they are still alive and fallible and subject to the clever plans of determined criminals.
This is a complicated question that revolves somewhat around your definition of ‘guard dog’. If by ‘guard dog’ you mean a proper guard dog, trained to remain calm, to attack on command, and to refuse food from strangers, you’re talking somewhere in the $45,000 - $65,000 range. To put this in perspective, you could have one of those dogs, or you could have a new Audi and a Cove security system. We’re not telling you what to do, but it seems like a pretty easy choice unless you have hit-men after you on a regular basis (in which case you probably have enough money to have a proper guard dog and a new Audi and a Cove security system).
If by ‘guard dog’ you mean a fun family dog that will deter burglars who are afraid of dogs and don’t know how to bribe them with steaks, then you should get one if you’re a dog person and you want a dog. It might help with your home security and it might not, but it’s not really a security decision. Either way, you probably want a home security system — like the Cove system — because even if you have a family dog, your security is a big burden to place on your dog’s shoulders (even if your dog is a German Shepherd or a Doberman Pinscher).