This thing is driving me nuts.

I tried to debug my MQTT secure connection on nodecmu. Following some post from year 2015 I was switched on debugging output with Serial.setDebugOutput(true). Now I tried to switch it off with setDebugOutput(false) as well as disabled, chose selective output, you name it from the menus:

arduino nodemcu settings

I tried to do

void setup(void) {

I also tried

void setup(void) {

It just keeps printing:

debugging infos

Posts from year 2015 show that this issue is addressed in some version of arduino/arduino GUI. Where should I look for the versions?

  • what happens if you send debug messages to Serial1, but do not connect the console to Serial1 so that the debug messages go into the "bit bucket"
    – jsotola
    Jun 17, 2020 at 3:37
  • Hi @jsotola, what a wonderful idea! And you know what? It solved the issue. I have set Serial.begin(115200);Serial1.setDebugOutput(true);, told Tools->Debug Port to be Serial1, and voila! the messages are gone! Will you post this as an answer, so I can set this question as resolved?
    – arthur
    Jun 17, 2020 at 5:35
  • you are in a better position to post the answer, because you can provide detailed information about what you had to do, to redirect the debug messages.
    – jsotola
    Jun 17, 2020 at 6:35
  • @jsotola, yes I am, once you add your answer, I'll add my three cents through edits
    – arthur
    Jun 17, 2020 at 8:03

1 Answer 1


If you cannot disable the generation of the debug messages, then you could try to redirect the debug messages so that they are not visible on Serial.

As a workaround, send the messages to Serial1 and keep the console attached to Serial.

This may not be an optimum solution, because the messages are still being sent, which takes up some of the processing power and uses up a serial port.

If that does not solve your logging problem, make sure that you also set Serial1 as your logging Serial from the menu:

set up logging serial

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.