Some testing today - remote debugging to a Linux VM. I have an event handler (window Resized) whose entire body is inside:
#if TargetLinux
// code here
#endif
This is because it seems the window Resizing event does not fire under Linux, but the Resized event does.
Now: I put a breakpoint inside the #if … #endif, and it didn’t fire unless I also selected Linux as the platform target under the build settings. Nothing of this nature is mentioned in the doc for breakpoint. Is this a bug?
have you test if break works for you?
i think because it is conditional compiling you only jump in if build settings is target linux, or the whole block is ignored.
The machine I am remotely testing is a Linux machine. So that code is executed. But a breakpoint set after execution starts, without setting the target before starting, seems to be ignored.
Normally for remote testing one does not need to set the target in the IDE. An exception to this some years ago (seems to be fixed now) was for the Pi, where one had to set architecture as ARM. Otherwise the app was downloaded but did not run.
I wonder whether the IDE has a bug there, that doesn’t take a breakpoint into consideration since the target is not linux (even as you are building for linux).
Maybe you could report it as bug and @William_Yu could check if the IDE does pass the breakpoint inside the #if to the remote debugger.