7 ms·
This article is an ad that doesn't even mention the real issues with print debugging: 1. Sometimes the information you can print about an object is not complet
by ffhhj 6y ago
This article is an ad that doesn't even mention the real issues with print debugging:
1. Sometimes the information you can print about an object is not complete due to console memory constraints, depth of the information, dereferencing, formatting, etc. So you will have to come back again and print more ranges of that information, and format the data to understand it.
2. Logging takes "a lot" time if you are working on high performace algorithms. Then it will be dangerous to forget removing a print.
3. Prints can leak security information.
4. In web browser consoles you get a live print of objects, not snapshots.
That said, print is my favorite debugging method, but I constantly search and remove them, specially on release.