Is it possible to programmatically restart a plugin from within itself?

Currently for debugging purposes I give my users a “Restart in debug mode” checkbox, but they have to still manually press Cmd+Alt+P or go through the menu to restart the plugin. Would be nice to give them a [ Restart ] button.

I am wondering the same here.

I’ve since found that it’s possible, just call figma.showUI() again and it in effect restarts the plugin.