Resuming scripts with plugin debugging enabled for local plugins upon resuming if the plugin has changes will load multiple instances

Error that occured when studio loaded in 2 plugin instances for the same local plugin, after I clicked “Resume Scripts” when an error occurred with a previous version of the plugin:


Beta features:

  • Accoustic Simulation
  • Avatar Joint Upgrade
  • Avatar Makeup
  • CreateAssetAsync Lua API
  • Dragger Qol Improvements
  • EditableImage support for SurfaceAppearance maps
  • Face Capture
  • gLTF Export
  • Improved Constraint Tool
  • Improved Find All/Replace All
  • Improved UIStrokes
  • In-Experience Avatar Auto Setup
  • Live Animation Creator
  • New Display Size API
  • New Luau type solver
  • New Video API
  • Next Gen Studio Preview
  • Proximity Prompt Indicators
  • Revamped Asset Manager
  • Script Sync [Early Preview]
  • Scripts are Non-Strict by default
  • Texture Generator
  • UI Drag Detectors
  • Video Uploads

I don’t know how to reproduce this, just that it occasionally occurs whilst I’m developing a local plugin (with reloading again usually fixing it). So I’ve attached the local plugins repo in a private message alongside its rbxm.
I’m using the build task in the surface-applier.code-workspace file to rebuild the plugins rbxm using rojo when I make changes in the repo.

Expected behavior

I would expect there to never be more than one instance created for a local plugin

A private message is associated with this bug report

I think I have a repro now? As it seems to occur if I make multiple changes whilst Scripts are paused because an exception was hit, with there being a plugin instance made for each change.

This bug has been recently causing studio to crash for me frequently, with a different plugin I’m working on.
Although it will only crash usually after several changes (plugin reload because of file changed) that cause the debugger to trigger, as I’m assuming its trying to resume a version of the plugin that is no-longer loaded.

Cannot get a reliable repro for the crashes as anytime I’ve tried to recreate them by undoing changes to my code slowly (as to trigger rojo to rebuild the plugin rbxm) it just doesn’t crash?

But the plugin source can be found here, and I’ve also sent the crash dumps.