I am trying to clean up my code for release builds and wanted to remove any call to printf. I saw on the mbed documentation and on this forum that a good way for this is to use “debug” where you would use printf but even if I compile with a debug profile, none of the messages using debug are printed out when the messages using printf are. Am I missing something in the setup? I tried using the same code as the example given here for debug Debug - API references and tutorials | Mbed OS 6 Documentation. but even this does not work.
I can always find a workaround by defining a macro or something but I thought it would be a shame if there’s an existing function already.