Closed Bug 849071 Opened 12 years ago Closed 12 years ago

Create some kind of chrome to turn source mapping on/off in the debugger

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: fitzgen, Assigned: past)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 6 obsolete files)

As of bug 765993 whether you are getting source mapped sources or actual sources is dependent on a pref, instead we should have some chrome to let the user turn this on and off.
Assignee: nobody → nfitzgerald
Assignee: nfitzgerald → past
Status: NEW → ASSIGNED
Depends on: 772119
Priority: -- → P2
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
Works, but needs tests.
Attachment #725168 - Flags: feedback?(nfitzgerald)
Attached patch Patch v2 (obsolete) (deleted) — Splinter Review
Now the stack frame list is updated correctly. Still needs tests.

I think I'll file a followup for displaying breakpoints after switching over to the other source representation, but we should either add a new protocol request, or use the sourcemaps library in the frontend to find the corresponding lines.

Also, followups for figuring out what to do with the variables view, watch expressions and conditional breakpoints (unless coffeescript expressions are always valid/untranslated JS expressions?).
Attachment #725168 - Attachment is obsolete: true
Attachment #725168 - Flags: feedback?(nfitzgerald)
Attachment #727548 - Flags: feedback?(nfitzgerald)
Attached patch Patch v3 (obsolete) (deleted) — Splinter Review
Simplified onReconfigure() and added a leaky test.
Not on purpose.
Attachment #727548 - Attachment is obsolete: true
Attachment #727548 - Flags: feedback?(nfitzgerald)
Attachment #727770 - Flags: feedback?(nfitzgerald)
Comment on attachment 727770 [details] [diff] [review]
Patch v3

Review of attachment 727770 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/debugger/debugger-view.js
@@ +56,5 @@
>      this.Variables.searchPlaceholder = L10N.getStr("emptyVariablesFilterText");
>      this.Variables.emptyText = L10N.getStr("emptyVariablesText");
>      this.Variables.onlyEnumVisible = Prefs.variablesOnlyEnumVisible;
>      this.Variables.searchEnabled = Prefs.variablesSearchboxVisible;
> +    this.Variables.originalSource = Prefs.sourceMapsEnabled;

Why are you attaching this property here (just curious)? Isn't it a bit premature, since nothing is happening with the variables view yet?
(In reply to Victor Porof [:vp] from comment #4)
> ::: browser/devtools/debugger/debugger-view.js
> @@ +56,5 @@
> >      this.Variables.searchPlaceholder = L10N.getStr("emptyVariablesFilterText");
> >      this.Variables.emptyText = L10N.getStr("emptyVariablesText");
> >      this.Variables.onlyEnumVisible = Prefs.variablesOnlyEnumVisible;
> >      this.Variables.searchEnabled = Prefs.variablesSearchboxVisible;
> > +    this.Variables.originalSource = Prefs.sourceMapsEnabled;
> 
> Why are you attaching this property here (just curious)? Isn't it a bit
> premature, since nothing is happening with the variables view yet?

No reason, plain oversight, thanks.
Attached patch Patch v4 (obsolete) (deleted) — Splinter Review
A couple of fixes, but the test still leaks.
Attachment #727770 - Attachment is obsolete: true
Attachment #727770 - Flags: feedback?(nfitzgerald)
I've been sidetracked from the leak today, trying to figure out why browser_dbg_bug740825_conditional-breakpoints-01.js fails intermittently (more often than not) with this patch. I don't see any relation to the failure, but the test depends on Debugger:AfterFramesCleared, which fires after a timeout, and furthermore conditional breakpoints cause extra protocol requests (due to bug 812172), so it must somehow affect the timing of those events.

I'm seriously considering fixing bug 812172, just to avoid this quagmire.
Attached patch Patch v5 (obsolete) (deleted) — Splinter Review
I finally fixed the intermittent failures in the conditional breakpoints test. Getting back to the leak now.
Attachment #729772 - Attachment is obsolete: true
Attached patch Patch v6 (obsolete) (deleted) — Splinter Review
Some cleanups, some arrow functions and sending of the sourcemap pref in chrome debugging, too. Because I might want to port the devtools to CoffeeScript next week.
Attachment #731319 - Attachment is obsolete: true
Attached patch Patch v1 (deleted) — Splinter Review
Apparently the leaks I was experiencing were caused by the main source maps patch in bug 772119. Rebased, and now all devtools xpcshell and b-c tests, as well as browser m-oth tests pass.

Rob, this is the UI part that was demoed during the work week. The toggle in the gear menu switches between the original and generated sources.
Attachment #731362 - Attachment is obsolete: true
Attachment #738032 - Flags: review?(rcampbell)
Attachment #738032 - Flags: review?(rcampbell) → review+
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/bd899fcceeab
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/bd899fcceeab
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: