Closed Bug 676602 Opened 13 years ago Closed 6 years ago

Multiple breakpoints per line

Categories

(DevTools :: Debugger, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: past, Unassigned)

References

(Blocks 2 open bugs)

Details

The jsdbg2 work in SpiderMonkey allows multiple breakpoints to be set in a single line, since there can be many bytecodes in there. We should provide a way for the debugger UI to accomplish that. 

This would also require to somehow resolve the ambiguity discussed in the remote protocol's response with multiple breakpoint actors (do we pause in all those handlers, or just in the last one? How do those handlers get references to the others?).
Component: Developer Tools → Developer Tools: Debugger
QA Contact: developer.tools → developer.tools.debugger
Priority: -- → P3
Priority: P3 → P4
No longer blocks: minotaur
Depends on: 568142
FWIW, the protocol and server support this, we just don't have a good UI for it. Maybe Darrin can chime in?
Flags: needinfo?(dhenein)
(In reply to Nick Fitzgerald [:fitzgen] from comment #1)
> FWIW, the protocol and server support this, we just don't have a good UI

Maybe a good starting point would be exposing it when the user does a "Prettify Source"?
(In reply to Mark Goodwin [:mgoodwin] from comment #2)
> (In reply to Nick Fitzgerald [:fitzgen] from comment #1)
> > FWIW, the protocol and server support this, we just don't have a good UI
> 
> Maybe a good starting point would be exposing it when the user does a
> "Prettify Source"?

Once the source is prettified, you should be able to set breakpoints on each of those new lines (we are source mapping), but still not multiple breakpoints on the same line. Is this what you need?
That would be good - though it doesn't seem to be happening in a current nightly (at least on the app I'm testing). Will investigate further.
> Once the source is prettified, you should be able to set breakpoints on each
> of those new lines

I haven't tested bleeding edge devtools versions - but certain obfuscation/minifier tools are now using commas for semicolons for many constructs. I assume even prettifying doesn't help here? Can you give me a way to set a breakpoint on the statement calling c() here?

(foo&&a(),b(),c()),d(),(bar&&e(),f())


> (we are source mapping), but still not multiple
> breakpoints on the same line. Is this what you need?

Yes, if this is what it takes when statements are comma-chained.. :-) This can also be solved with special stuff in the prettifier, I guess, but wrapping and indenting such code can get pretty complex. How would you like to see this wrapped?

for(var i;foo&&(bar()&&i<50)||foobar();i++)

A feature that makes each JS statement separately focusable and lets you double-click (or equivalent keyboard command) a statement to add a breakpoint there would make this easier.
Flags: needinfo?(dhenein)
Summary: Allow multiple breakpoints in a single line to be set → Multiple breakpoints per line
Product: Firefox → DevTools

We've implemented Column Breakpoints in the DevTools debugger, behind a pref, which should be turned to true shortly. Closing as I believe that's what this bug is requesting.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.