Lua Debugger - New Features Live!

Hi developers,

We’ve promoted two features in our debugging army from “Beta” to “Live”! These are Universal Breakpoints and Plugin Debugging.

Universal Breakpoints

Universal Breakpoints make using breakpoints more intuitive by applying them across all contexts (Edit/Client/Server) by default. From here on, breakpoints set in any Script will be copied to all contexts where that script exists. This ensures that the breakpoint you set will always be hit.

Old Behavior

New Behavior w/ Universal Breakpoints

You can still set breakpoints that are restricted to a specific context (Client/Server) by right-clicking on the Script Editor gutter and choosing the “Insert Contextual Breakpoint” option. This option only appears when in a Play mode, for Scripts that belong to the Client or Server context. Contextual Breakpoints are yellow.

If you don’t see this option appear, check that your script has a blue or green symbol on it’s tab, indicating that it belongs to the Client or Server, respectively. The Script on the left belongs to the Client; the Script on the right belongs to the Server.



Plugin Debugging

Plugin Debugging provides a convenient way to use the Lua debugger in Studio while creating Plugins. You may remember the flavorful release post. :slight_smile: Plugin Debugging is Disabled by default but can be turned on from the Studio > Debugger > Plugin Debugger Enabled setting.

Enabling Plugin Debugging will create a new Service called “PluginDebugService” in the Explorer.

The source of any local plugins can be found here and you can use the full Lua debugger. Breakpoints set in these Scripts will hit. When they do, you can navigate the callstack and view variable state with the Watch window. Any edits made can be reloaded through the following options:

  • Reload Plugin - reloads the plugin directly
  • Save and Reload Plugin - saves the changes to your local plugin, then reloads changes

Warning: If your plugin modifies itself at run time, Save and Reload is not recommended as you will be saving the modified version of the plugin and replacing the contents on disk.

Many thanks to @anshulbhai and @windy0724 for leveling up these features! Down with the bugs!

130 Likes

This topic was automatically opened after 17 minutes.

Breakpoints are one of the best debugger tools ever and you guys just improved them. Kudos!

Amongst the many already great features of breakpoints like conditional expressions, data inspection, I would like to see function breakpoints join the squad.

5 Likes

Is the new PluginDebugService detectable by scripts in server and local side? Does it act like any other top level singleton and can it be viewed in game

3 Likes

Wait… We finally got Plugin Debugging. I’ve been struggling with reloading all the plugins. I used to exit Roblox studio then re-enter it. So already, I can see how this is a lifesaver.
This will also truly help out a lot for many other developers who use Plugins all the time!
But will we be able to insert a Script into PluginDebugService? Is it modifiable?

After watching the video before and after I can tell the simple difference that this can really help out, and be helpful. This can help locate errors way easier and this can already be seen as helpful to any scripters out there.

I am finally pleased to see new features. I am really impressed with these features and how useful they are.

Thank you both so much for this great feature that will help out many plugin users and scripters. I can’t express my words to you. Always keep up the great work you both are doing! :happy3:

2 Likes

I’m just waiting until debugging functions from modules become easier.

I don’t use these debuggers because they’re not documented well enough, for me.

Right now, I remember seeing that functions from modules can’t be looked over, I wish we could open the function inside of a module and see the parameters and everything. That would be amazing of a feature to get.

It’s a good step seeing Plugins being more debuggable smartly though.

Does this feature let you add breakpoints at runtime again?
Sometimes I don’t realize I need a breakpoint until the game breaks in an interesting way… then it’s too late!

Seems like a really cool feature! Will there be some nice documentation for this in the near-future? It would be nice to be able to clearly see examples and descriptions of what everything does here, and to make it easier for people to learn how to use this.

1 Like

This will make debugging very easy, thank you!

1 Like

Yes, it does. I’ve been using it since it came out and it’s just like the current debugger. Click in the script, place your breakpoint, wait for the code to hit it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.