Closed Bug 1590885 Opened 5 years ago Closed 4 years ago

Expose line-wrap as option in the debugger

Categories

(DevTools :: Debugger, enhancement, P3)

enhancement

Tracking

(firefox81 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: Harald, Assigned: luc4leone)

References

(Blocks 2 open bugs)

Details

(Keywords: dev-doc-needed)

Attachments

(3 files)

Bug 1108132 landed devtools.debugger.ui.editor-wrapping. Lets expose it in the Debugger, either context menu now and/or settings menu later.

David, would this be a gfb?

Flags: needinfo?(dwalsh)

Kevin, I think this would be right up your alley! We recently implemented a gear icon for the console -- I think we could do the same for line wrap, inline preview, etc. for the debugger!

Blocks: dbg-frontend
Flags: needinfo?(dwalsh) → needinfo?(khmorehouse)

v0 for this could just add it to the context menu in the source.

One caveat I noticed, with line wrap on in Debugger, switching Debugger tab with pretty-printed file open took several seconds due to several expensive layouts from code mirror; probably some code path that only gets hit for line-wrapped views.

I can work on this.

Thanks for the recommendation, David!

Flags: needinfo?(khmorehouse)

Assigning to you, thanks for the help.
Honza

Assignee: nobody → khmorehouse
Status: NEW → ASSIGNED
Attached image SourcesContextMenu.png

Honza, just to clarify:

When you say "add it to the context menu in the source", are you referring to the context menu in the Sources tree (highlighted in red)?

Flags: needinfo?(odvarko)

(In reply to Kevin Morehouse from comment #7)

When you say "add it to the context menu in the source", are you referring to the context menu in the Sources tree (highlighted in red)?

It could also be the context menu in the source code preview (or both).
Let's ask Harald what he had in mind.

Honza

Flags: needinfo?(odvarko) → needinfo?(hkirschner)

It could also be the context menu in the source code preview (or both).

Right, context menu in the source of a file, where we also show Inline Preview as option.

Flags: needinfo?(hkirschner)

Ok, great. Thank you both. Apologies for any confusion my last message may have caused.

Just something to QA after this; I had to disable the line-wrap option as it caused severe multi-second hangs when switching from Debugger to Console (something in code mirror).

Can I be please be removed from this? I don't currently have the time to work on it. I'll come back if anything changes. Thanks!

Flags: needinfo?(hkirschner)
Assignee: khmorehouse → nobody
Status: ASSIGNED → NEW

(clear ni?)

Flags: needinfo?(hkirschner)

(In reply to :Harald Kirschner :digitarald from comment #9)

It could also be the context menu in the source code preview (or both).

Right, context menu in the source of a file, where we also show Inline Preview as option.

Did I understood it right Harald?

Flags: needinfo?(hkirschner)

Yes, this nails it :)

Flags: needinfo?(hkirschner)

(In reply to :Harald Kirschner :digitarald from comment #15)

Yes, this nails it :)

Thanks Harald :)

I managed to make it work, but I have a doubt. It works only if after toggling the context menu item I close (and then open) the Dev Tools. Is that how it's supposed to work, or lines should wrap immediately after toggling? I made a 34s video to explain this point better: https://www.dropbox.com/s/r9w6ccu9ory5z8f/01_should-it-work-like-that.mov?dl=0

As for the context menu item label for now I wrote Wrap long lines / Unwrap long lines. A shorter option might be Wrap lines / Unwrap lines. I started with a verb because that's what the other labels do. There are many other options. For example Textmate editor uses Wrap column, while VSCode in general starts with Word wrap (there are a few options regarding wrapping). What do you think is the best copy?

Flags: needinfo?(hkirschner)

Hi Jason, I'd like to be assigned to this one. Should I first submit a patch and then wait for feedback or better wait for an answer to my doubt (see my comment above)? Thanks.

Flags: needinfo?(jlaster)

I'd submit a patch. that always helps.

Flags: needinfo?(jlaster)
Assignee: nobody → luc4leone

Added an option to the debugger editor context menu for the user to be able to wrap / unwrap long lines.

Let's see if we can get this unstuck …

Flags: needinfo?(hkirschner)

(In reply to :Harald Kirschner :digitarald from comment #20)

Let's see if we can get this unstuck …

Hi Harald,

I submitted a patch https://phabricator.services.mozilla.com/D60681#C2083687NL61 a couple of weeks ago. I need to take care of a Lint error about function complexity, and I need to write the code to change the app state, because right now the app updates only if I close and re-open it, which I guess, it's not the expected behavior. I'll try to do it this week, is that OK with you?

Flags: needinfo?(hkirschner)

Thanks for the ping back luc4leone! It is OK to take your time – mostly wanted to check if I had dropped the ball of if you were waiting on input from us.

Flags: needinfo?(hkirschner)
See Also: → 1590433
Depends on: 1631975
Keywords: dev-doc-needed
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2dc89b5597d8 Expose line-wrap as an option in the debugger editor context menu. r=nchevobbe
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: