There was this one time I had a prolonged dental operation, I was fully conscious, the dentist talked himself through a delicate situation while hunting in my mouth for the right angle to do it. And I thought suddenly, hey, it's just like me when I'm debugging! Cool!
What your doctor (and dentist, etc.) are really doing with you is exactly the same as what you do when you're debugging a program. Except that health care providers don't have the luxury of having a debugger or the ability to examine the "machine" state in accurate detail.