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”. (which is fine)

The problem is that trying to exit and save will cause Studio to hardlock, and will require some other application, like task manager, to close it.

Expected behavior
The debugger should not be triggered (or should exit) if the script is parented to nil.

Hi, thank you for filing this issue. I added it to our queue. We don’t currently have a timeline to fix this.

Hi @NiceBuild1,

Please only mark the issue “Solved” when we have fixed it. This helps us keep track of the status of these.

We’ll keep you updated on the status as we go along with the fix.

Thank you!

1 Like