One way in which medicine is not like debugging is the hours spent by a physician vs a programmer. I (as a programmer) have sometimes spent 100 hours tracking down a bug whereas I've never seen a physician spend more than a few minutes trying to diagnose an illness.
Even with a gravely ill person, my experience has been that an attending physician has never spent more than about 15 minutes on the diagnosis (or to be a bit more generous, let's say several 15-minute re-evaluations as new information came to light, such as blood test results).
It's a strange contrast. I considered my bugs to be serious bugs, and it was worth 100 hours to diagnose it correctly. But my bugs are nothing compared to a human life. Why is our medical system OK with quick diagnosis? Does it all come down to money or would more time available to the physician make no difference because [medicine is art not science / some other reason]?
And while there is no official documentation available, there is plenty of good guesses from hordes of brilliant reverse engineers.
Still, there are only a handful of error codes that are thrown, and you have to make your first guesses from those and the logging is pretty terrible when you do decide to dig a bit deeper.
And inserting your own code into the spaghetti mess is a bit of a crapshoot.
Physicians are trained to preload all possible diagnoses based on a certain set of initial symptoms--they have ideas about what the potential answer might be when you inform them of their symptoms, but in order to narrow that space down, additional workup needs to be performed (tests, imaging, etc) and until those results come back, anything else they say is speculation.
(edited, fixed a typo)
Additionally, when you work on a software-bug you probably try a bunch of different solutions. Try it to see if it works, repeat. There's only so much information on a patient, doc spends some time reviewing and makes a diagnosis/treatment decision/orders tests. Wait a day or a couple weeks for results, then repeat.
And doctor resources are scarcer than programmers. It would be great to have 2-4x as much time with a physician when you are sick, but $$$.
I have. The physician's debug loop just takes a lot longer than a programmer's. He orders tests, then waits days for them to come back before ordering more tests. This can go on for months. Then he prescribes something, and has you take it for a few weeks. Did that help? No? Try this instead. Etc.
Of course this doesn't mean that your putative attendings diagnostic skills are any worse - just that they are going to be more and more likely to miss things that actually were inferable from the data, when the case is not simple. At least, without a possibly profound change in practice and training.
As both a doctor (surgical attending) and programmer medicine feels not just like debugging a very complex non linear machine. Patient psychology is one of the hardest parts of the job. Is the stomach pain caused by a psychical problem or can it be functional? The use of protocols (part of the science) can help in catching non typical presentations of illnesses, especially if the patient is not adequate in presentation (drunk, very young, old, trauma etc).
But sometimes medicine comes down to an art, when you have the feeling something does not add up, you have to dig. The same with (older) attendings with very attuned diagnostic skills due to lots of experience that can help solve non-obvious cases.