What do you call using print statements to debug code?
-
18-09-2019 - |
Question
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 = function2(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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow