As a Roblox developer, it’s difficult to execute a single script while running, debugging a script without using alternative workarounds that harm current workflows.
In my sandbox, I’ve create some scripts or functions that I want to debug in individual scripts for each one, whenever I run studio, statements or sections of code from other scripts interfere with debugging on a particular script. TMK visual studio code runs a single script file if it’s opened, a tool named ’Execute Script’ () should behave to run a script that’s opened in studio.
Disabling all scripts that I don’t want to execute before running isn’t a viable solution, especially in game environments.
If Roblox is able to address this issue, it would improve my development experience because I can run an script individually without multiple scripts interfering in output or universe.
local Selection = game:GetService("Selection")
local selectedScript = Selection:Get()
if selectedScript and selectedScript:IsA("Script") then
local moduleScript = Instance.new("ModuleScript")
moduleScript.Source = selectedScript.Source .. "\nreturn false"
Scripts can edit and pollute the datamodel in a game environment outside of normal runtime. This isn’t very desirable just for the purpose of testing code. You should copy and paste these scripts into a new baseplate in a separate Studio session to test them.
Maybe a Run Script in Sandbox button which is the same as Run, but only executes the selected script? This would be a somewhat useful feature if you need to test the entire datamodel without any other scripts running.