Debugging (run time on/off) at Source Firmware code for photon

Some help please,
I know than I have to use debug_output_ function in order to get debug messages at run time.
What I do not find is where I have to turn on debugging.

I’m also looking for the answer to this question. I found the function
void set_logger_output(debug_output_fn output, LoggerOutputLevel level)
will implement the
function. But after looking into the source code and libraries, the
doesn’t been invoked by anywhere.

So regarding to Photon, how to implement debug print:
DEBUG("Hello from Spark!");
in the function

I just remeber from core that it was easy by ,somehow, setting DEBUG mode to something , but I do not remenber more

static bool log = false;
void debug_output_(const char *p)
    if (log)

And then in setup()

log = true;

That is what found, but it does not work to me.

Debugging docs here -

1 Like