debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Add breakpoint in closed source tab accidentally

Open magicp-github opened this issue 9 years ago • 6 comments

Steps to reproduce

  1. Go to "about:home"
  2. Select source "chrome://browser/content/contentSearchUI.js"
  3. Click Pretty Print button -> formatted source tab "{ } contentSearchUI.js" will be opened.
  4. Close formatted source tab "{ } contentSearchUI.js"
  5. Add breakpoint on line 7 in "contentSearchUI.js" tab
  6. breakpoint is added in "contentSearchUI.js:formatted: 6"

Actual Results breakpoint is added in closed tab "contentSearchUI.js:formatted: 6"

Expected Results Add breakpoint in active source tab.

add-breakpoint-in-closed-source-tab

magicp-github avatar Feb 10 '17 06:02 magicp-github

I'm able to reproduce this in Nightly. Now we just need to be able to reproduce it in development mode.

clarkbw avatar Feb 10 '17 18:02 clarkbw

Thanks for filing the bug. This is actually intended behavior because we will store breakpoints in the original location (a.k.a pretty location).

We can do something nice here and jump you to the original location where we store the breakpoint if it would help.

jasonLaster avatar Feb 10 '17 22:02 jasonLaster

I'm able to reproduce this in Nightly. Now we just need to be able to reproduce it in development mode.

Oh, I was actually looking at the wrong bug. I thought this was #1982

clarkbw avatar Feb 10 '17 22:02 clarkbw

Should the the tab auto switch to the prettied tab { } contentSearchUI.js when add breakpoint on contentSearchUI.js?

rrandom avatar Feb 11 '17 04:02 rrandom

It is complicated behavior for me. Because in step 5, if click on line 1, new breakpoint will be added in original tab. I think that If it is intended behavior, both of original and prettied tab should not be displayed at the same time.

magicp-github avatar Feb 11 '17 09:02 magicp-github

I think #2813 is related here. Going to close this one out for now as I don't think we're getting to it right away. I can only reproduce it on about: pages and not with other websites, that would be good to get a better test case.

clarkbw avatar May 04 '17 22:05 clarkbw