Finish One Thing before Starting Another
Especially when writing code, I have to contain my impulse to "just take care of this one thing, now that I'm thinking about it." Because troubleshooting often involves undoing, you don't want to have to undo that one thing.
Just write it down so you don't forget.