A couple things, he doesn't pee in front of you because he's upset with you. HOWEVER, dogs can pee out of anxiety or stress, meaning, if they are stressed or anxious they don't have the same ability to control their bladder. Also, at 10 months old, you shouldn't need to take him out every half hour. Aside from that, is he fed on a schedule? If he's fed on a schedule, poop times should be pretty consistent. And, when you take him out, thinking he should poop, it might help get the bowels moving if you play with him, getting him to run around a bit first.
I don't mean to sound harsh, but, if he is able to "sneak off and poop" as soon as you get back inside, you aren't watching him closely enough. Do you take him out on a leash? If you don't, I'd suggest taking him out to do is business on a leash, because then, if he DOESN'T poop, you can keep him on the leash inside, right with you, thereby taking away the freedom for him to sneak off. Then, try again.
Lots of times alternating 5 minutes outside to try pottying, then 5 minutes inside to wait (if he didn't potty when you had him out) will help. You just go back and forth every 5 minutes, til he's done it. Also, if he does poop inside, pick it up and take it outside where you'd like him to go, so that he can smell his poop outside. That might give him the idea it's ok.
And, have you used an enzymatic cleaner on the spot he uses inside? Regular cleaners leave enough enzymes for a dog to tell the stain's there, even if we think it's clean. And, it attracts him to the same spot. For the time being, you might try to limit his access to that "same spot", even if you have to place something over it so he can't get to it.
Good luck!
I don't mean to sound harsh, but, if he is able to "sneak off and poop" as soon as you get back inside, you aren't watching him closely enough. Do you take him out on a leash? If you don't, I'd suggest taking him out to do is business on a leash, because then, if he DOESN'T poop, you can keep him on the leash inside, right with you, thereby taking away the freedom for him to sneak off. Then, try again.
Lots of times alternating 5 minutes outside to try pottying, then 5 minutes inside to wait (if he didn't potty when you had him out) will help. You just go back and forth every 5 minutes, til he's done it. Also, if he does poop inside, pick it up and take it outside where you'd like him to go, so that he can smell his poop outside. That might give him the idea it's ok.
And, have you used an enzymatic cleaner on the spot he uses inside? Regular cleaners leave enough enzymes for a dog to tell the stain's there, even if we think it's clean. And, it attracts him to the same spot. For the time being, you might try to limit his access to that "same spot", even if you have to place something over it so he can't get to it.
Good luck!