Allow to move a conditional breakpoint to another line

As a Roblox developer, it is currently too hard to move a conditional breakpoint to another line.
If I have a conditional breakpoint with a complex test inside and I want to move this breakpoint to another line, currently, if I click on it, it’s deleted and I have to recreate a new one and redo all its conditions manually.

If Roblox is able to address this issue, it would improve my development experience because this will avoid having to keep manually recreating conditions from inside a breakpoint every time I want to move it to another line.

1 Like

Check out the DebuggerManager class, it can be used in the command bar and you can write macros to do stuff like clone breakpoints.

Could you show me how could I achieve this goal?

There is no script editor API that allows you to get the current line the script editor caret is on. Since there is no other way for you to identify what breakpoint you want to copy within the script editor itself, you would be unable to use DebuggerManager to write a plugin or macro that can copy and paste breakpoints without requiring obstructive plugin UI.

The only way you’d be able to do this is by listing all of the breakpoints in the current script inside of a widget, and then allowing the user to duplicate one to a line number that they must manually enter.

1 Like

Thank you for your feedback.
We currently don’t support moving a conditional breakpoint.
There is a debugger overhaul going on, and will be shipped in Q4. We will take this into consideration for the new release.


One trick might be to put the condition into a variable so you can more easily add a check for it.

local x = (complex condition)
if x then
   local fake = 4 #Breakpoint here. 
   #this whole if statement can be moved easily
   #and you can use normal breakpoints without any conditionality
1 Like