Closed Bug 792320 Opened 12 years ago Closed 5 years ago

Highlight the current function when a stack frame is selected

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: past, Unassigned, Mentored)

References

Details

(Whiteboard: [lang=js])

I got this idea from: http://hci.rwth-aachen.de/stacksplorer
I'm sure I've seen it before though. When the user clicks on a stack frame, it would help him focus on that if we used a grey background or a more subtle color for the rest of the source. Removing the focus from the stack frame would revert the highlighting, or alternatively, clicking (or moving the caret) on the grey text. I'm not sure if Orion provides such an API, but we can definitely take care of the debugger side of things.

Another option would be to send all the scripts (including inner scripts, like functions) from the server to the client, so that picking a frame would reload the editor with just the text of that particular function. In that case however it wouldn't be easy to glance at the context, so I think option 1 would be preferable.
We can do this with Orion - we can highlight a region of text.
Depends on: 687168
(I think I'm just reiterating Past's concerns?, but:)
I really don't think hiding context is a good thing. In the short term, maybe this wouldn't have any immediate effect on usability, but in the grand scheme of things (read bug 725235 and friends), context is king. Whenever I'm paused on a frame, I usually want to see the values of variables in different scopes. This is currently done via the variables/properties view, but hovering would be so much nicer. Even more, when we'll get live function replacement, context sounds like a quite important thing to have.

I still agree to the fact that html context is pretty much useless, and we could even strip out all the context when in an eval frame, but this is a whole different discussion.

Highlight a region of text sounds amazing. How hard would it be to expose this functionality? Is it dependent on the Orion update?
(In reply to Victor Porof [:vp] from comment #2)
> Highlight a region of text sounds amazing. How hard would it be to expose
> this functionality? Is it dependent on the Orion update?

Being used with the code: it should be easy, but I do not want us to blatantly expose the Orion annotations mechanism - I do not find that ideal. I want some nice API around the Orion API.

That bug was not high priority. The Orion update makes sense to happen before - less code to rejigger.
Priority: -- → P3
Depends on: 759351
Whiteboard: [mentor=past][lang=js]
No longer depends on: 759351
Component: Developer Tools: Debugger → Developer Tools: User Stories
Mentor: past
Whiteboard: [mentor=past][lang=js] → [lang=js]
Component: Developer Tools: User Stories → Developer Tools: Debugger
Product: Firefox → DevTools

A couple years ago we highlighted the code that was in scope with a darker grey. Unfortunately, this had two issues:

  1. javascript scopes are not as contiguous as you'd like and visually it is noisy
  2. from a perf perspective this was slow

I'd like to revisit other ways of showing scope information in the editor, but for now i'm closing this issue as it is quite old.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.