开发者

What do you call using print statements to debug code?

I'm just curious, but is there a name for the process using print statements to debug your code? An example in pseudocode

 x=3.2e39
 print x
 y = function1(x)
 print y
 z = functi开发者_如何学JAVAon2(y)
 print z
 w = function3(z)
 print w

Executation:

 3.2e39
 3.2e36
 NaN
 NaN

reveals some bad math in function2. If there's no standard name, what do you call it?


It is often called "printf debugging", even if something named printf isn't used, after the C function. It's really a simple form of logging, and you could use various names to that affect.

In a language that has a print statement or function as you showed above, "print debugging" would be clear enough without having to explain printf to someone that's never used C or a similar function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜