Requiring a module containing breakpoints causes debugger to break

(please excuse the lengthy and somewhat misleading title)

I’m not really sure how to describe this bug, since the way to cause it is very unorthodox and specific to my case, despite this I’ll try to explain the issue.

I’ve found that requiring a ModuleScript that contains a breakpoint after it has been set to be destroyed (or its parent set to nil) will cause the debugger to glitch out.

You can replicate this by creating a ModuleScript and adding one breakpoint inside and running this command in the command bar.

local targetModule = workspace.ModuleScript

task.defer(function()
  targetModule.Parent = nil
end)

require(targetModule)

I would like to note that the parent of the ModuleScript doesn’t matter as long as it isn’t nil initially.


67_f3f23b5e-e161-4d5b-8635-4f8359a76187_RobloxStudioBeta

The only way to exit the debugger at this point is to open (or create) another script and click “Resume Scripts”.

Trying to exit and save will also cause Studio to hardlock, and will require some other application, like task manager, to close it.