0

so I got a strange one.

I have a form. On the form at the bottom I have four of the windows buttons.

I am having an issue which only occurs when no debugger is attached. With the debugger attached (observed) it works correctly with the position of the buttons as described in the designer file.

However, when running without the debugger (unobserved) the button positions collide with each other.

I always assumed that having a debugger attached could not cause any issues. You are only observing the stuff right? Or is it some conundrum like some quantum-bug.

I have been really hitting my head with this one. Why would the positions not be respected when no debugger is attached. Any information would be helpful… I am looking into how debuggers actually work now.

Here is how it looks when the debugger is not attached: no debugger attached

and, Here is how it looks with the debugger attached: with debugger attached

I tried using another button too (tried windows button and devexpress simple buttons all with the same issue).

Thank you

PS: I looked for Debugger.IsAttached and that does not occur in the code. It is only one these buttons... they are in split containers but that is it.

CodeMusic
  • 87
  • 10
  • 1
    Maybe take a look here https://stackoverflow.com/questions/39363622/form1-visual-size-doesnt-match-form1-debug-visual-size – Timothy G. May 27 '21 at 18:11
  • oh wow, thanks Timothy! This looks helpful, and I do have a high resolution (though others without with the build do encounter it). Thanks for the resources, I will let you know if it heps! – CodeMusic May 27 '21 at 18:55

1 Answers1

0

I still do not know the why. Perhaps dpi scaling or something that only happens with no debugger.

But, after removing the anchoring the issue went away.

So, if you have weirdness like this consider testing without anchors.

Thanks all for the input.

CodeMusic
  • 87
  • 10