程序出错时如何找到错误?

07-05-27 lingzihan1215

哪位高人给回答一下,程序出错时怎样找到错误,特别是没有报告异常但也没有运行成功时如何找到错误。

blackbat
2007-05-28 02:46

汗 就是你的程序逻辑错误了

一般通过错误提示信息找错

还有就是打印出的异常信息

shanghaimin
2007-05-29 06:25

break your code in several small pieces.

and use system print out

the principle is

error is not the result that you expect to see.

then trace back line by line to see if each statment does what you expect them to do.