does a monitor change execution in anyway?

Hello,

My sketch got stalled every day or so. Now running with attached monitor to display all the messages to hopefully find out where it crashes.

Unfortunately(!) its running now for 3 days.

I tried to see for myself if attaching the monitor changes anything; as as far a i could see, using a scope on pin 13 and a small program who continuously just prints a line to a putty terminal, there's absolutely no difference in the loop cycle. Yes I prevented the reset on connect during my tests.

Can you guys confirm my finding?
.. and suggest a mean to hunt the bug? any post mortem mean?

Thanks for your time

In theory no, but you've added code to do the prints so you've introduced interrupts which cause delays that may have effects. A look at your code would help, otherwise just a guess.

How is the Arduino powered?

(If you understand the question there will be two answers.)

DKWatson:
In theory no, but you've added code to do the prints so you've introduced interrupts which cause delays that may have effects. A look at your code would help, otherwise just a guess.

Thanks, I have not added code. Print code is always there. Just added a physical monitor

Thanks, one answer. Powered via 9V via barrel connector. When monitored by the PC I suppose the logic there chooses the 9 V and not the usb. When monitored by a tab / phone in OTG than it should be as a PC: no current drawn from usb

The only Arduinos where connecting / disconnecting a PC can affect the behaviour are those with native USB support like Leonardo or sam based boards.

9 V battery?

sterretje:
The only Arduinos where connecting / disconnecting a PC can affect the behaviour are those with native USB support like Leonardo or sam based boards.

According to the circuit diagram, UNO R3 (I think the Chinese version) the board will take power from the stronger of the two supplies. There's an OP amp being used as a comparator that will switch between them.

No, 9V 1amp ac adapter

sterretje:
The only Arduinos where connecting / disconnecting a PC can affect the behaviour are those with native USB support like Leonardo or sam based boards.

Sorry... forgot to mention, my board is a mega -us made- with enet shield -chinese-

DKWatson:
A look at your code would help, otherwise just a guess.

the code is quite lengthy
I am going though it all looking for non atomic volatile manipulation. I may have some stuff to clean and am preparing a version with zero such occurrences.