I was puzzled by the following question: How to keep the advantage of the "static" label but still be able to debug production code on site?
Not once it happens that unintended behavior is occurring at the customer site, and only there . In many cases, having the option to perform a debug can save a lot of effort and provide a very quick response. Such a debug usually involves checking function behavior, which brings us to the "static" definition.
Static functions cannot be debugged from a debug shell, like putting breakpoints or executing it. On the other hand, defining all functions as public causes code structure and optimization grief.
I'm aware of options like compiling at least two different builds, one with static and one without, but this fits well with automation tests, not with the final production build that goes out eventually.
Will appreciated some insights from your side, mainly on how you resolved (if any) this dilemma. Or rephrasing the question to: "What is more important?"
A good discussion on "static" in C here.