The Plugin Debugging Service is one of the most powerful tools out there for plugin developers, and can let you take your development to the next level when fixing bugs.
This tutorial attempts to showcase how to use Rojo and the Debug service to create plugins in external editors without having to sync once.
Prerequesities
- Rojo.exe is installed and preferably in the $PATH environment You can install the rojo.exe application here
- PluginDebuggingService is enabled (this tutorial will explain how to enable it, but if you have it already enabled, skip to step 3)
- Some Lua knowledge, obviously.
To begin with, we’re going to go over how to enable the Plugin Debugging Service, if you already have this enabled, skip to stage 3
Step 1: Enable the Plugin Debugging beta from the Beta Features window
Press save, then restart studio (you’ll be prompted to do it anyway)
Step 2: As the description suggests, go to Studio Settings then turned on Plugin Debugging Enabled (you can open the window with Alt+S)
You’ll be prompted to restart Studio again, but before doing so, proceed with Step 3
Step 3: Create an empty folder with an empty script
Save this folder as an RBXM in your Studio’s Local Plugin Directory. (Press Save To File, not Save as Local Plugin)
Finally, for this step, restart Studio. This is so Studio knows to load the RBXM into the plugin debugger, and can then be used with your external editor for incrementally building changes.
Step 4: Create a Rojo Project for your plugin.
I’m going to gloss over this step, but for more information on how to use Rojo projects, click here
For now, assume we have this workspace set up in vscode.
Step 5: Write your plugin as expected, this plugin, I’m going to copy the Wiki’s example of creating an empty script
Step 6: Build your project through Rojo using the command bar, this example assumes you have Rojo in your PATH enviornment. vscode provides a built-in PowerShell terminal to save you some time.
(if you called you rbxm someting other than EmptyScriptAdder, replace it with that)
EDIT: vscode provides a GUI based command you can execute using Ctrl+Shift+P
Step 7: Reload the plugin in Studio using PluginDebugService.
The plugin should’ve now have reloaded the change that you made in vscode, and you can repeat steps 6 and 7 to incrementally update your development plugins.
(oh yea i put my reload plugin shortcut on F13, saves some time heh)