Closed Bug 898470 Opened 11 years ago Closed 6 years ago

Display last debugged script in debugger instead of first loaded script when possible

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: Gijs, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [chrome-debug])

Right now, we load the last script the debugger received over the debugger protocol. This is not what I (as a user) want in 99.5% of cases. It would be nicer if we loaded either nothing, or the last debugged script. The problem with the latter is that if that is big, e.g. browser.js, that might be slow. Then again, we already have that problem sometimes - just with scripts that I'm not interested in. :-)
Whiteboard: [chrome-debug]
I don't think it is helpful for the user to see an empty source editor, but I agree that loading the last script would be much better. The sad performance of our source editor is, as you mention, a different problem. When we don't have the last script stored, we could cheat a little and display a known small script by default. Never underestimate the power of first impression! :-)
(In reply to :Gijs Kruitbosch from comment #0)
> Right now, we load the last script the debugger received over the debugger

Small correction here, it's actually the first source. But that doesn't affect any of the points you make below.

I would vote for showing the last shown source if found, otherwise revert to the first received source.
(In reply to Panos Astithas [:past] from comment #1)
> When we don't have the last script stored, we could cheat a little and
> display a known small script by default. Never underestimate the power of
> first impression! :-)

How would you know what is a "small script"? A weighted table of known small sources? What if none of them are loaded yet? I would love it if we could refrain from such deciding on "ad-hoc pseudo-empirical" behavior :)
(In reply to Victor Porof [:vp] from comment #3)
> (In reply to Panos Astithas [:past] from comment #1)
> > When we don't have the last script stored, we could cheat a little and
> > display a known small script by default. Never underestimate the power of
> > first impression! :-)
> 
> How would you know what is a "small script"? A weighted table of known small
> sources? What if none of them are loaded yet? I would love it if we could
> refrain from such deciding on "ad-hoc pseudo-empirical" behavior :)

I think you told me that loading a big source file is not slow, but showing it is. So maybe we could just always load it, but if it's "big", not show it (calls for a pref for people who want to always load browser.js! ;-) ).
See Also: → 902152
Priority: -- → P3
Summary: Load last-loaded or no script at all in the browser debugger → Display last debugged script in debugger instead of first loaded script when possible
Product: Firefox → DevTools

Closing as this is related to the old UI. The new UI has tabs, which should help.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Blocks: 1565711
Blocks: 1565713
No longer blocks: 1565711
No longer blocks: 1565713
You need to log in before you can comment on or make changes to this bug.