Several Methods That Could Help You Fix The Bugs

Here are some methods that could help you fix the bugs, all of them are come from my experiences.

1) Observe and try to get information as more as possible. Those could be the program run crash information, where to crash and when crash; the variable status and memory content;  console output information; log output information; bug, error, exception reporting; any compiling errors or warning around the point in the code. Usually, you could easily find that some bugs are caused by NULL pointer, dis-match code and data version, and so on.

2) Reproduce the bug and debug & trace the logic. We will use this method to check and read the source code, and try to find something un-logic place. Well, for big project, this method may make you frustrated, because there are so many source code. It is very hard to master all of the content. But with this method, you could grasp a general idea about the workflow. You could do a compare it with a normal version. Also, you could set break point or data break point to find when some location is called, and when and where some memory has been changed;

3) Think twice and write down all possible reasons, and try them one by one. After you have checked one possible reason, and please write what the result, what happen if I try like this. Some methods, like re-start the computer, re-launch the kit, re-compile the project or the data or even re-install the computer, seems does not make scene, you also need to try them when you have no ideas; Here you need to try to solve the problem by logic, but some un-logic reason still could be tried when you not figure out where the real reason is.

4) Check the bug first time come out version. Then you could do a compare with the previous version, and found the modification that may cause the reason.

5) You should better prepare a bug-tracker locally as you go with your project. Some bugs may happen again and again with the similar outputting by similar code. Most of the bugs could be fixed easily by experienced project team members.

6) Ask help from some more experienced guys, source code author, or other team members (Or even some professional support team members). You could even broadcast an e-mail to all your team members, and collect some ideas for them. Of course, you could post a BBS or QQ some other guys out of your project space.

7) Temporally give it up, but track it down, and re-check it later. You will find some bugs will be fixed automatically after some time. If not, you will find that you will be more confident in front of the bug, because you are more familiar with the whole project source code right now. Usually, you should set a time limitation for some bugs, you should avoid spend too much time to fix some very tick bugs. Keep on doing something without giving up is a good habit, but knowing where and when should be stopped also be a good habit.
8) A good work attitude, read code with patient  and check carefully are also very important while fixing bugs.

转载于:https://www.cnblogs.com/open-coder/archive/2012/11/10/2764084.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值