In the course of work everyone encounters bugs or problems. They can be dealt with by either:
The best solution is to use a combination of 2 and 3.
This approach raises the question of priorities. If you hit too many hurdles you continually get diverted from the main task. For example when fixing the Client form you encounter a problem with the Client Contact form which breaks the Products form etc. (This can be described as the "Tree Approach" as opposed to the "Straight through to the Goal approach".)
You need to try to balance short term productivity with long term improvements. The idea is that it is better to get 2 things done at 100% than get 4 things done at 75%! At a minimum, always add the issue to the backlog.