6

I don't know if it's only me or if anyone have experienced that sometimes, when my code is not doing what I expected it to do, then I add a log.d to debug what's happening.Then.. It magically fix the program, without me fixing it...Weird

Comments
  • 2
    You've encountered a Heisenbug!
    https://en.m.wikipedia.org/wiki/...

    Might be some kind of timing issue, as the logging probably adds some ms to each call.
  • 1
    @uxmedic what will happen if I remove the log??will the problem return??
  • 0
    @bigeyes26 Hard to say, that depends on the underlying nature of the defect. If it's a timing problem, it might be back when you "turn the light off". Or it might not. That's kinda the nature of that beast.. :(
Add Comment