Closed Bug 1696157 Opened 4 years ago Closed 2 years ago

Breakpoints panel expands when clicking on a frame in the call stack panel

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: nchevobbe, Assigned: luke.swiderski)

References

(Blocks 2 open bugs)

Details

(Keywords: good-first-bug)

Attachments

(3 files, 2 obsolete files)

Steps to reproduce

  1. Open the attached file
  2. Open DevTools
  3. Select the debugger
  4. Open dbg_breakpoint_panel.html and add a breakpoint in the c function (line 30)
  5. Click on "Click me" button below
  6. Once the debugger pauses, collapse the breakpoint panel
  7. In the callstack panel, click on the a frame

Expected results

The breakpoints panel stays collapsed

Actual results

The breakpoints panel expands

Thank you for the report Nicolas, I can easily reproduce it on my machine (Win10, Fx Nightly).

Honza

Severity: -- → S3
Has STR: --- → yes
Priority: -- → P3

Note that other side panels stay collapsed.

Here is the place where we expand/collapse the panel
https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/devtools/client/debugger/src/components/SecondaryPanes/index.js#334-337

The opened prop should be set to false if the panel should be collapsed. Perhaps something is wrong with the logic or the condition?

This could be a good first bug...

Honza

Keywords: good-first-bug

Hi,
I would look to work on this issue!

Flags: needinfo?(nchevobbe)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #2)

Note that other side panels stay collapsed.

Here is the place where we expand/collapse the panel
https://searchfox.org/mozilla-central/rev/002023eb262be9db3479142355e1675645d52d52/devtools/client/debugger/src/components/SecondaryPanes/index.js#334-337

The opened prop should be set to false if the panel should be collapsed. Perhaps something is wrong with the logic or the condition?

This could be a good first bug...

Honza

Here,

opened:
        prefs.breakpointsVisible ||
        pauseReason === "breakpoint" ||
        pauseReason === "resumeLimit",

While i logged pauseReason to console, it outputs breakpoint .Hence opened prop is always true because of OR condition.

opened:
        prefs.breakpointsVisible &&
        pauseReason === "breakpoint" ||
        pauseReason === "resumeLimit",

This condition works fine and breakpoint panel remains collapsed.

Flags: needinfo?(odvarko)

(In reply to RAHUL SAWRA[:rsawra] from comment #3)

Hi,
I would look to work on this issue!

Thanks! I assigned you the bug

Assignee: nobody → r.sawra
Status: NEW → ASSIGNED
Flags: needinfo?(nchevobbe)

Thanks for helping!
Honza

Flags: needinfo?(odvarko)

This bug fixes the breakpoint panel that expands.

Depends on D107222

Attachment #9207378 - Attachment is obsolete: true

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: r.sawra → nobody
Status: ASSIGNED → NEW

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #6)

Hello! Can I work on this bug?

Very glad to find others are interested in this (well, one or two, anyway), and very much looking forward to the problem going away. Had I a clue as to how to go about helping to fix it, I would. Also glad to see recognition that the list is supposed to stay un-expanded exactly as the other lists. I was beginning to think there was something extra-special about Breakpoints.

I would like to add that it was difficult to find NIcholas' original complaint (or any similar). 99.99% of hits alluded to variations on the problem of phantom breakpoints, even searches for quoted string "breakpoints list". And there are a lot of that sort of hit.

(In reply to Angelina from comment #10)

(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #6)

Hello! Can I work on this bug?

Assigned to you, thank you for the help.

Assignee: nobody → angelinasen1
Status: NEW → ASSIGNED

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: angelinasen1 → nobody
Status: ASSIGNED → NEW

irwp has expressed an interest in hacking on this, so assigning!

Assignee: nobody → irwp
Status: NEW → ASSIGNED

Hi Honza! The fix suggested by :rsawra seemed to fix the unexpected behavior (changing the condition from || to && above). Another bit of unexpected behavior that was fixed by this change is that when the Log checkbox on the Event Listener Breakpoints panel is checked, the Breakpoints panel would opens. I am an outreachy applicant and hope that I have submitted the patch correctly (still getting used to mercurial; moz-phab returned some confusing output).

Finally, I think there might be followup bug lurking in this code, since even after the fix there are times when the variable prefs.breakpointsVisible can sometimes be false when the panel is opened and true when the panel is closed. The about:config setting for devtools.debugger.breakpoints-visible tracks this variable so the mismatch can be seen with that. I don't fully understand what causes this mismatch but would be happy to do some further testing on it.

Flags: needinfo?(odvarko)

Thank you for the patch irwp!

The bug is fixed, but now state of the "Breakpoints" side panel isn't properly persisted. It's always collapsed when opening the Debugger panel

STRs:

  1. Load any page e.g. google.com
  2. Open DevTool and select the Debugger panel, the Breakpoints side panel is collapsed
  3. Expand the Breakpoints side panel
  4. Close and Open the DevTools Toolbox
  5. Check out the Breakpoints side panel, it's closed => BUG

I don't fully understand what causes this mismatch but would be happy to do some further testing on it.

Perfect, this would be great, thank you!

Honza

Flags: needinfo?(odvarko)

This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit auto_nag documentation.

Assignee: irwp → nobody
Status: ASSIGNED → NEW

Previously when closing the breakpoints panel in secondary panes,
if an unselected call stack frame was selected, the breakpoints
panel would unexpectedly open. This patch makes sure it remains
closed when a user has closed it and then clicks other elements
in the secondary panes. The same issue was happening when
clicking the event listener breakpoint log checkbox, and or step
in, step out, and step over. This patch should also fix
Bug 1755337.

Assignee: nobody → luke.swiderski
Status: NEW → ASSIGNED
Attachment #9207734 - Attachment is obsolete: true

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → luke.swiderski
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98aa89bef0c4 Fix unexpected opening of breakpoints panel r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: