How do you reproduce bugs that occur sporadically?

前端 未结 28 1593
离开以前
离开以前 2021-01-30 19:43

We have a bug in our application that does not occur every time and therefore we don\'t know its \"logic\". I don\'t even get it reproduced in 100 times today.

Disclaime

28条回答
  •  我在风中等你
    2021-01-30 20:20

    Since this is language-agnostic, I'll mention a few axioms of debugging.

    Nothing a computer ever does is random. A 'random occurrence' indicates a as-yet-undiscovered pattern. Debugging begins with isolating the pattern. Vary individual elements and assess what makes a change in the behaviour of the bug.

    Different user, same computer? Same user, different computer? Is the occurrence strongly periodic? Does rebooting change the periodicity?

    FYI- I once saw a bug that was experienced by a single person. I literally mean person, not a user account. User A would never see the problem on their system, User B would sit down at that workstation, signed on as User A and could immediately reproduce the bug. There should be no conceivable way for the app to know the difference between the physical body in the chair. However-

    The users used the app in different ways. User A habitually used a hotkey to to invoke a action and User B used an on-screen control. The difference in the user behaviour would cascade into a visible error a few actions later.

    ANY difference that effects the behaviour of the bug should be investigated, even if it makes no sense.

提交回复
热议问题