As far as I can see, the bug is not random, it’s caused when there is a missmatch between the build configuration used by the indexer, the active build configuration, and the current action.
For example, if the indexer is configured to use the active configuration, you can reproduce the bug by doing the following:
- Build the GCC release target.
- Set a breakpoint.
- Without changing the current build target, debug the RTE debug target (the RTE target will be rebuilt automatically).
Now, when execution hits the break point you will get the label error. If you set the active build configuration to the RTE target, debugging works as expected.
While it may appear to be random if you weren’t aware that the target you are debugging was not the last one you built, at least for me, this is consistently the cause of this bug. Maybe other people really are having random problems with this bug, but I suspect this is the culpret.
The obvious workaround is to tell the indexer to always use the RTE debug target. The problem here is that when working with another target, the indexer becomes worse than useless, as it is indexing the wrong build.
Given that if you try to debug a target that is not the active build configuration, it is automatically rebuilt, the UI obviously considers this a valid action, so should therefore know to update the indexer too.