|laziness, impatience, and hubris|
That's what works for me. What works for you? How do you get your ego our your way?
I don't think debugging your own code is so much an ego problem as it is a problem with tunnel vision. When you initially apply yourself to coming up with the solution to a problem, each person develops there own perspective on the situation and it can be hard to get out of that.
When I debug my own code, "ego" isn't generally an issue. It's usually a matter of methodical elimination of everything that's working properly, to get to the stuff that ISN'T working properly.
For example, I'm working on a Powerbuilder + ASE application right now. Often the bugs come in the form of data not being correctly displayed, often due to not retrieving the right data to begin with. To eliminate this, I'll step through to the point in the code where I'll see something like:
ltr_procs.p_someproc(param1, param2, param3, ..., paramN)
This is an object through which stored procs (ie. p_someproc) can be called. At this point I'll open up my SQL Editor, connect to the database, and exec the proc with the parameters it's getting passed when I step through, having in mind what data to expect, and comparing it to what actually gets returned. From here, I'll place SELECT's within the SQL code at critical points until I see that the results are no longer making sense.
I seem to do this at LEAST once, if not twice a week, and it always works like a charm. :) So in conclusion, my advice (and my practice) is to forget about ego, and concentrate on developing debugging skills that will leave nothing to chance.