Debugging Session Start Button should prevent double submission
It's possible to start several debugging sessions at the same time by clicking the Debugging Session start button really fast. This leads to incorrect behavior of the debugging experience. Pressing F5 multiple times has the same effect.
@digeff I can not reproduce this, or I am just not fast enough. Can you reproduce with any repository. On what platform do you see this?
@weinand can you repro this?
@isidorn we should prevent this independent from how quickly you press the F5 button.
Yup we are protecting with our state changes - in theory somebody could be fater than the state changes thus being able to start two times. But I was unsuccessfull. Can you repro?
It doesn't count if I cannot reproduce this, since there will be always a faster computer where this can be reproduced. We should make our 'protection' robust against this. If the 'state change' comes too late, then we will have to introduce a 'state change pending' lock.
we have a state for that, it is 'initializing'. Previously I was setting this state too late (after running preLaunchTask), this state is now set asap.
@isidorn that sounds like a great fix. But I will have a hard time verifying this ;-) I need the faster computer now!
@weinand Actually, I think that the slower the computer, the easiest it'll be to reproduce this (because the human needs to be faster than your code changing the state). I originally reproduce this in a very slow Mac.
@digeff of course, you are right. But getting a faster computer is always a good idea ;-)