Open Bug 1780512 Opened 3 years ago Updated 2 months ago

Stop selecting pretty printed source twice when enabling pretty printing on a given source

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When we toggle ON pretty printing on a given source, we are currently selecting it twice.

A first time over there, which we await for:
https://searchfox.org/mozilla-central/rev/a352cc827575823676717d53766c39710b54201a/devtools/client/debugger/src/actions/sources/prettyPrint.js#78
And then, a second time, other there, which this time, we don't wait for!!
https://searchfox.org/mozilla-central/rev/a352cc827575823676717d53766c39710b54201a/devtools/client/debugger/src/actions/sources/prettyPrint.js#140

Ideally, we should only keep the second selection, which correctly select the pretty printed source. (While the first reselect the minified source)

Unfortunately, fixing this highlights many race condition and design flaws on pretty printed source management and might require a more substantial fix.

  • extend the coverage of pretty printed button (which relates to isJavascript method).
  • fix selectSource test helper against WASM sources (they don't have symbols)
  • fix a bug in createPrettySource which was selecting the pretty printed source twice
    Its callsite, togglePrettyPrint is already selecting the source.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: