Can you clarify your reproduction steps? Are you editing your script directly through the debugger plugin instance? What method are you using to save and load plugin changes?
I personally haven’t encountered this issue yet. Any time I have saved to file and used the “Reload Plugin” or used the “Save and Reload Plugin” button directly from the debugger, it always stops any previous instances of the plugin and executes the latest revision.
If the plugin script changes would be interpreted immediately, the result would be undefined behavior and possible crashes in event handlers and threads that are using parts of the currently loaded DataModel. Thus the only option to terminate plugins is to unload the current DataModel.
On the other hand if you’re developing plugins with a small place, it should be fairly painless to load/unload it.
You can also invoke parts of the plugin code using the Command line if your plugin is well modularized and its components are independently loadable and executable.
You don’t need to reopen Studio; just install the plugin for local development with “Save as Local Plugin” (right click context menu action). Every time you need to reboot the plugin, just reinstall it again like this and it should refresh your plugin bar and immediately run the new version of the plugin.
Automatically re-running your plugin on any change might not be desirable in all situations if your code is spread over multiple files. Many plugins consist of multiple module scripts that need to interact with each other.
Either way, this is not a bug but a missing feature, you should move it to Studio Features.
If you want to stay in Edit Mode, you can close the place of your plugin and reopen it for the plugin reload.
Another technique is to have a single, very simple point of entry for your plugin, and all the rest of the logic reachable from there but also triggerable by a (debug) UI or Command line that is removed for publishing. That way you don’t have to unload every time, just hit the trigger.
I forgot, but there is one more way of restarting the plugin debugging in Edit mode without closing anything (this might be what you’re looking for): by using the Right Click + Save and Reload plugin on the plugin under the PluginDebugService in Explorer:
The problem with auto reload is that some people might not have your exact workflow and would like to have some control over when things are reloaded; imagine having to deal with a reload on every keystroke or every few seconds if we debounce. Even if it worked for you, it wouldn’t for a set of other people.
Additionally, while it is possible to reload the plugin itself without the DataModel reloading, it is generally problematic to change or reload code that is running.
In the end we’re trying to be respectful and create a predictable solution that covers most use cases; prioritizing for the features and bugs that might affect more people, without compromising stability.