Instead of killing my script on an error, open a debug window there

It would be a lot easier to debug stuff in Roblox Studio if it had the behavior that Visual Studio does, where when code crashes the default behavior is that I get a debugging interface that lets me inspect the values of different variables.

Right now this is how I do it:

  1. Run Game
  2. Get script crash with line number
  3. Go to script and set breakpoint
  4. Run Game again and hope to get same crash

Coming from Visual Studio, this is incredibly painful.

Edit: I just noticed this pane in the debugger.

image

Why is the default value “Never”?!

20 Likes

This actually defaulted to “On Unhandled Exceptions” when it was first created! It was changed to “Never” after it confused users (audience of Roblox Studio is different than Visual Studio after all)

5 Likes

I understand why I might not want it to pop up for other peoples’ scripts that are in models I imported.

I’m working on some pretty nasty code and the debugging experience is not great. I hope there’s a roadmap full of QoL improvements.

So far I’ve noticed:

  • Code stopping a line or two after the breakpoint I set. Will AST improve this?
  • Mousing over variables while debugging doesn’t show their value (at least not consistently)
  • Lots of clicking to drill down into “member variables” of table objects (which is almost everything)
  • Intellisense not great, even given the typeless nature of Lua. I want hints on parameters so I don’t have to constantly be looking stuff up
  • Crashes in server scripts lose call stack across client/server boundary, even running local
  • print is a demon from hell. When I print userdata, stringify it for me instead of crashing. When I concat 10 variables to print them all, don’t crash if one is nil

I hate Lua and coding in Lua. I feel like I am constantly swimming through piles of garbage and nothing can ever be clean.

8 Likes

I am constantly experiencing this frustration and many others with the extreme limitation of debugging in Studio.

My code is complex, and when there is an error, it is difficult to have to retrace all the way again until you get the same error.

Being able to debug the variables and everything else from a error is MANDATORY!

image

You can? This was mentioned in this thread.

1 Like

Sorry, I can’t find this option. How to activate?
Found, although tricky… Sharing for anyone else with the same question:

  1. First I need to click on a script (the script menu will not be shown if I’m not in a script)
  2. Then I can find the options on the Studio header:

1 Like

I’m using Studio for 5 months, every single day, struggling with Studio debug limitations, and I didn’t know this option.
And now I realize that the default value for my Studio was always “Never”.
If I knew that this option existed, and especially if this option was not set to “never” by default, many debugging problems would have been solved much faster!
I think this option is so important that Studio should NEVER have the “never” option as the default.

1 Like