You can be somewhat trapped and limited in the house. If there are 2 burglars, then you can really get trapped inside if they enter front and back.
It may depend on whether they know you are there or not, and if you are sure of that.
I would really rather confront them outside, before they enter, if there has to be a confrontation.
Obviously, I'd have to make a decision well before they actually got to my door.
It's almost always best for you to choose where the confrontation occurs, rather than let them decide, if a confrontation seems inevitable.
You can always just hide and call 911 and hope nothing bad happens, and hope they don't get away and harm someone else later.