Lua Debugger completely broken / makes Studio unusable when TestService.ExecuteWithStudioRun is true

I discovered this bug yesterday when using the Lua debugger. I’ve now been able to isolate the issue. This bug is pretty nasty.

This issue can be reproduced with two normal scripts both requiring a single ModuleScript, with a breakpoint set inside the ModuleScript. These two issues occur only when TestService.ExecuteWithStudioRun is true, even if there are no scripts inside TestService.

  • When one of the scripts is enabled, Studio will continue to function but it will skip over the breakpoint like it’s not there.
  • When both scripts are enabled, Studio will act like it hit the breakpoint but none of the debugger tools become available, and Studio is now in an unstable and broken state.
    • Attempting to press Play results in an error.
    • Attempting to Stop the game doesn’t function as intended.
      • The toolbar buttons remain unusable
      • The render view never resumes
      • Upon closing a script, the script code will remain in the render view, frozen
      • The “File” button in the upper-left corner is nonfunctional, even if you close the game.
    • This issue persists between place files. After this happens in one game, this window of Studio will never work again, even if you close the game and re-open a new one.
      • The only solution to this problem is a complete restart of Studio
  • Both of the above problems happen regardless of if Accurate Play Solo is enabled or not.
  • You must click the green “Run” arrow to reproduce these issues, as they do not occur in Play Solo mode.

LuaDebuggerTestServiceRepro.rbxl (14.0 KB)
(Remember to set a breakpoint on line 4 of ModuleScript before running.)


This bug is still occurring as of 2020-03-25.

I will start work on this today. May have some follow up questions.

I cannot repro this part. When I set a breakpoint on ModuleScript on line 4 and Run, I hit the BP as expected, can Resume as expected.RIDE-536.rbxl (18.5 KB)

It’s still happening for me. You’re running with the green “Run” button instead of Play Solo, right?

Whoops NVM. I did not have TestService. ExecuteWithStudioRun enabled.
So yes breakpoint seems to get skipped.

I believe I have a fix. Thanks for patience. Stay tuned.


OK yeah I think I have a fix for this.
On a personal note, been a rough day today (we are all quarantined because of this COVID 19 thing) and it really helped to have an interesting problem to work on where I knew I could make one of our users happy by fixing it. Thanks very much for reporting and giving good details on how to repro.