Closed Bug 813180 Opened 12 years ago Closed 8 years ago

Set conditional breakpoints via the source view gutter

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dangoor, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sourceeditor])

To set a conditional breakpoint, it appears that you need to expand the Debugger view to include the breakpoint list and then right click on a breakpoint there. It would be nice if you could do it directly from the gutter in the source view without having to open the other views.
Thanks for the bug report! This needs UI work in the source editor.
Whiteboard: [sourceeditor]
You can right click in the editor in the line where you want to set the breakpoint and select the Add Conditional Breakpoint menu item, but clicking in the gutter would certainly be more intuitive. Firebug uses right click to set conditional breakpoints, which seems confusing to me. Maybe Ctrl/Cmd-click or Alt/Opt-click is better? The latter is The Right Way for alternative behavior AIUI.
(In reply to Mihai Sucan [:msucan] from comment #1)
> Thanks for the bug report! This needs UI work in the source editor.

The reason why I put the breakpoints popup inside the pane is because getting a breakpoint node from the source editor was incredibly hacky, and also (when planets aligned) apparently I could retrieve multiple div.breakpoint nodes for the same line. Also, the doorhanger pane's arrow wasn't showing for some reason.

If we're to implement this and some other features like "show a different icon for conditional breakpoints", "hover breakpoints to see the conditional expression" and "right click on gutter to add conditional breakpoint" (don't know if all of these have bugs on file), then, as Mihai said, we need to expose this functionality from the source editor.
(In reply to Panos Astithas [:past] from comment #2)
> You can right click in the editor in the line where you want to set the
> breakpoint and select the Add Conditional Breakpoint menu item, but clicking
> in the gutter would certainly be more intuitive. Firebug uses right click to
> set conditional breakpoints, which seems confusing to me. Maybe
> Ctrl/Cmd-click or Alt/Opt-click is better? The latter is The Right Way for
> alternative behavior AIUI.

You can add a conditional breakpoint without necessarily opening the popup on a line, via Accel+Shift+B.
filter on TAKETHATPAUL.
Priority: -- → P2
filter on BLACKEAGLE.
Assignee: nobody → mihai.sucan
(not actively working on source editor bugs)
Assignee: mihai.sucan → nobody
OS: Mac OS X → All
Hardware: x86 → All
The context menu now appears when right-clicking on the source view gutter, probably since the CodeMirror conversion. The only problem still remaining is setting the breakpoint (conditional or not) in the line that received the click. This might be fixed in bug 982025 or bug 986151, but it's not clear yet.
Conditional breakpoints could still be improved but this original bug has been fixed.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.