Open Bug 1839447 Opened 1 year ago Updated 1 year ago

Column conditional/log points can't be created right away

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

If you try creating a column breakpoint right away as a conditional or column breakpoint,
it will end up being set on the first existing breakpoint on that line.
If the column breakpoint already exists, things work as expected.

It relates to this code:
https://searchfox.org/mozilla-central/rev/a5da23c8c9c1151dcdf0ca34b3cfd0a4d0fc3b48/devtools/client/debugger/src/components/Editor/ConditionalPanel.js#255

  const breakpoint = getClosestBreakpoint(state, location);

As the breakpoint doesn't exists, the conditional panel will pick any existing breakpoint nearby....

In the action trying to create the breakpoint, we accept not having a breakpoint:
https://searchfox.org/mozilla-central/rev/a5da23c8c9c1151dcdf0ca34b3cfd0a4d0fc3b48/devtools/client/debugger/src/components/Editor/ConditionalPanel.js#82-90
which is the case when creating a line conditional BP...
but here for column BP, there is no BP on that precise location but there is always the first one on the line.

May be we should do a strict breakpoint lookup on conditional location??
The loose lookup was introduced in bug 1543261... may be it is actually useful for key lookups?

Another way to workaround this would be, from the context menu, to ensure creating the BP before opening the conditional panel.

Severity: -- → S3
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.