Closed Bug 1907259 Opened 4 months ago Closed 4 months ago

Breakpoint aren't working properly when wrap line option is enabled

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: nchevobbe, Assigned: bomsy)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

If you enable the wrap line option and shrink the editor so it's very narrow, the breakpoint preview on hover is misplaced.
Also, you can trigger a block collapse when clicking on the gutter, even if you didn't click on the button itself

This helps with the styling:

diff --git a/devtools/client/debugger/src/components/Editor/Breakpoints.css b/devtools/client/debugger/src/components/Editor/Breakpoints.css
--- a/devtools/client/debugger/src/components/Editor/Breakpoints.css
+++ b/devtools/client/debugger/src/components/Editor/Breakpoints.css
@@ -40,7 +40,7 @@
 .cm-lineNumbers .cm-gutterElement:not(.empty-line, .cm6-gutter-breakpoint):hover {
   background: url(chrome://devtools/content/debugger/images/breakpoint.svg) no-repeat;
   background-size: auto 15px;
-  background-position: right;
+  background-position: top right;
   -moz-context-properties: fill, stroke;
   fill: var(--gutter-hover-background-color);
   stroke: var(--gutter-hover-background-color);

But it seems that enabling the wrapping also messes up with the line gutter even listener, as clicking on the line does not trigger https://searchfox.org/mozilla-central/rev/01aaa47e62a2015e7641f26ab0bc2bb00ab579b8/devtools/client/debugger/src/components/Editor/index.js#243-244

editor.setGutterEventListeners({
  click: (event, cm, line) => {
Severity: -- → S3
Priority: -- → P2
Summary: Breakpoint preview is misplaced when wrap line option is enabled → Breakpoint aren't working properly when wrap line option is enabled

But it seems that enabling the wrapping also messes up with the line gutter even listener, as clicking on the line does not trigger https://searchfox.org/mozilla-central/rev/01aaa47e62a2015e7641f26ab0bc2bb00ab579b8/devtools/client/debugger/src/components/Editor/index.js#243-244

editor.setGutterEventListeners({
  click: (event, cm, line) => {

This is fixed by the patch in Bug 1907260

Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c957d178a74d [devtools] Fix the hover breakpoint styling when line wrapping is on r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: