Closed
Bug 915433
Opened 12 years ago
Closed 11 years ago
[jsdbg2] Debugger.Source.prototype.text doesn't show whole HTML files
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: fitzgen, Unassigned)
Details
This means that we can't use Debugger.Source for HTML-embedded scripts in the debugger because the lines are way off and setting breakpoints completely breaks.
Comment 1•12 years ago
|
||
Do you have a test case that demostrates the problem?
(I am not sure what the bug report is about)
When I load e.g. https://getfirebug.com/tests/head/console/breakOnError/breakOnError.html, I can see the source and also create a working breakpoint (on line 28).
Note that this bug is referred in ThreadSources._sourceForScript method.
Honza
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Jan Honza Odvarko from comment #1)
> Do you have a test case that demostrates the problem?
> (I am not sure what the bug report is about)
>
> When I load e.g.
> https://getfirebug.com/tests/head/console/breakOnError/breakOnError.html, I
> can see the source and also create a working breakpoint (on line 28).
>
> Note that this bug is referred in ThreadSources._sourceForScript method.
>
> Honza
It works in the debugger now because we aren't using Debugger.Source for inline scripts.
Say you load this web page:
<html>
<body>
<script>
console.log(Error().lineNumber);
</script>
</body>
</html>
Right now, we will show in the debugger the whole HTML source along with the contents of the inline script. Debugger.Source.prototype.text only has the contents of the script tag, you get something like this (maybe with or without some whitespace):
console.log(Error().lineNumber);
However the lineNumber is still 4, while we display it as 1, so we can't just say "ok, we won't show HTML anymore, just actual script source" because we would need to handle the offset. Maybe that is the way forward (I suspect it might be) but we have put the Debugger.Source and server integration on hold for now to work on memory and performance tooling, where we are sorely lacking.
Reporter | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•