Set breakpoints from View Source

NEW
Unassigned

Status

P4
normal
7 years ago
13 days ago

People

(Reporter: dcamp, Unassigned)

Tracking

10 Branch
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

Comment hidden (empty)
There used to be a plan to use SourceEditor in View Source, but IIRC it was decided that hsivonen's new parser was better? In the old plan bug 707987 would provide (most of) the solution, but if we end up not using SourceEditor we should hack View Source directly?
hsivonen's viewsource update is useful for HTML files. I wonder if we could use some smarts there and display CSS and JS using the SourceEditor? That would allow us to use the same mechanism for setting breakpoints as the debugger.

cc-ing Henri for his opinion.
It's not clear what the question that my opinion is being asked on is.
(In reply to Henri Sivonen (:hsivonen) from comment #3)
> It's not clear what the question that my opinion is being asked on is.

I think Rob's asking whether we could use your HTML parser in viewsource for HTML docs and SourceEditor/Orion for JS & CSS docs.
If SourceEditor/Orion can highlight a line by line number, I expect it to work for JS/CSS.

Does SourceEditor support showing line numbers? Could it be used for plain text, too? (In order to avoid having to add support for plain text line numbering to the current View Source back end?)
(In reply to Henri Sivonen (:hsivonen) from comment #5)
> If SourceEditor/Orion can highlight a line by line number, I expect it to
> work for JS/CSS.
> 
> Does SourceEditor support showing line numbers? Could it be used for plain
> text, too? (In order to avoid having to add support for plain text line
> numbering to the current View Source back end?)

Sure. You can see in the way it's used in Scratchpad that there are always line numbers displayed and there's SourceEditor.setCaretPosition(line, column) that highlights the selected line (but do note bug 717219).

CC-ing Mihai who's the expert on SourceEditor.
(In reply to Henri Sivonen (:hsivonen) from comment #5)
> If SourceEditor/Orion can highlight a line by line number, I expect it to
> work for JS/CSS.

That is correct. SourceEditor/Orion can highlight a line by line number and it can work with JS and CSS for View Source.

> Does SourceEditor support showing line numbers?

Yes. See Scratchpad.

> Could it be used for plain text, too? (In order to avoid having to add support for plain
> text line numbering to the current View Source back end?)

Yes. SourceEditor can be used for plain text as well.
Priority: -- → P3
Priority: P3 → P4

Comment 8

5 years ago
Sounds related to being able to set breakpoints from itchpad when itchpad eventually lands.

Updated

5 years ago
Blocks: 980430
Component: Developer Tools: Debugger → Developer Tools: User Stories
Component: Developer Tools: User Stories → Developer Tools: Debugger

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.