Open Bug 1579353 Opened 7 years ago Updated 3 years ago

Make opening debugger for a given source better

Categories

(DevTools :: Debugger, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: nchevobbe, Unassigned)

Details

When a user wants to open a source by clicking on a message location in the console for example, and the debugger wasn't open, it seems like there's a lot of things going on.

The entry code is in devtools/client/shared/view-source.js#59-95

Basically:

  • we load the whole debugger panel
  • then check if the source can be loaded, if so, select it
  • if not, check if a sourcemap exists, and load the source from a url
  • if none of the above, open a view-source tab

I think that in step 1 we are doing exactly the same steps you would do if opening the debugger directly (i.e. not click on a specific location).
Which means we probably load all the sources, and try to build the source tree, and load the debugger saved breakpoints for everything, and render already opened tabs. It's a lot, and it takes some time to be done.

In the case where the debugger can't open a source, we open a view source tab, which feels really unpolished (and move the user out of their current tab)


In an ideal world, here's how I think it should look:

  • user click on a message location
  • the debugger is loaded in a minimal state (no source fetching, no previous state re-opening, etc …)
  • a temporary tab is opened, with the name extracted from the location the user clicked on
  • in the panel where will be the editor, we display a loading ${url} message
  • when the source is loaded, we can rename the tab and fill in the editor content
  • if the source couldn't load, we display a message saying there was an issue finding the source, and provide a link to open the view source tab
  • at this point, we can load what's left to be loaded for the debugger to work (saved breakpoints, other sources, …)

I think this would result in a massive perceived performance improvement for the user, especially since this is such a common interaction to open the debugger.

Jason, David, how does that sound?
Do you see any potential technical issues with the ideal workflow I'm picturing?

Just adding NIs, so the question isn't lost in bugzilla noise :-)
Honza

Flags: needinfo?(jlaster)
Flags: needinfo?(davidwalsh83)

This sounds like a nice idea

Flags: needinfo?(jlaster)
Priority: -- → P4
Priority: P4 → P5

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit auto_nag documentation.

Flags: needinfo?(davidwalsh83)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.