# Why you should do printf debugging

DevFeed: [Why you should do printf debugging](<https://devfeed.tech/articles/why-you-should-do-printf-debugging-39732.md>)

Original publisher: [Read original article](<https://www.timdbg.com/posts/why-you-should-printf/>)

Author: Tim Misiak

Published: 2022-09-24T19:20:24Z

Content type: opinion

Language: en

Sources: [TimDbg](<https://devfeed.tech/sources/timdbg.md>)

Topics: [debugging](<https://devfeed.tech/topics/debugging.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [debug](<https://devfeed.tech/tags/debug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [tools](<https://devfeed.tech/tags/tools.md>), [troubleshooting](<https://devfeed.tech/tags/troubleshooting.md>)

## AI overview

The article argues that printf debugging remains useful in some situations, even though debuggers are often easier for investigating code. It explains that choosing a diagnostic technique involves tradeoffs such as lightweight versus heavyweight methods, time versus space, and predefined versus ad hoc data collection.

## Source excerpt

If you know who I am, you might think that this post title is clickbait. Maybe it is, a little. But the truth is, you should do printf debugging! Sometimes. Often not. But sometimes, you should! Let me explain. When most of us first started programming, we had one tool at our disposal. It was "printf debugging". Sometimes just littering the code with printf("here"), printf("here2"), and my favorite, printf("why won't this code work?