Inserting a breakpoint while running the game works.
But interestingly, if I do the same inside a MouseButton1Down function, it is not immediately recognized by the debugger (and will only be recognized if I stop the game and start it again):
Here the original design for your convenience: Baseplate.rbxl (45.2 KB)
One more detail: if the breakpoint already exists (turned off) before running, and then I run the game, if I turn this breakpoint on it won’t have any effect after clicking a button (MouseButton1Down).
And this will be for ANY breakpoint at any point in the script, not just inside the MouseButton1Down function. (But the opposite works):
Actually, this is URGENT, as it is IMPOSSIBLE for me to debug a piece of code inside a loop, where I want to leave the breakpoint off and only turn it on for the moment before clicking a specific button.
But currently that doesn’t work, and I have to leave the breakpoint on BEFORE running the game; But then, Studio is stopping HUNDREDS of times unnecessarily at this breakpoint, just because of this bug…
Noted. We will take a look. The reason why this is happening is because Roblox Studio currently doesn’t map some GUI scripts correctly between play modes when they are cloned.
One workaround for this is to go into the Explorer while you are in Play Mode and open up the specific instance of the script under Players/[PlayerName]/PlayerGui/ScriptName, and add the breakpoints there.
This bug has become quite inconvenient as I’ve been debugging a lot of things based on mouse clicks.
Do you have any predictions for the solution of this bug?
Using your workaround, this happens, which is something I still can’t understand: the same LocalScript has a breakpoint set BEFORE running the game and another DURING game running.
I understand that an “Intuitive” debugger shouldn’t differentiate between a breakpoint created before or after the game runs:
Yes, that is part of the fix for this issue that we are working on. Our debugger has trouble making the connection between original and cloned scripts in certain situations. The ideal behavior is propagating breakpoints on original scripts to all cloned scripts, and propagating breakpoints added on cloned scripts to original scripts. This fix is actually taking longer than expected, due to a number of edge cases, and we apologize for the inconvenience.
Hello, after 40 days, apparently this fix lost priority, right?
However, it has been a lot of work. Every time I need to activate a breakpoint AFTER the game is running, I have to:
In the Explorer window, look for the LocalScript instance that is inside the Players and open it
Manually find the line and set the necessary breakpoints
And after the project is stopped, ALL breakpoints set above are LOST.