* [Edbrowse-dev] alert(e.stack) !
@ 2016-06-24 18:58 Kevin Carhart
0 siblings, 0 replies; only message in thread
From: Kevin Carhart @ 2016-06-24 18:58 UTC (permalink / raw)
To: Edbrowse-dev
I just stumbled on something that could make a big difference in
conjunction with good line numbers. The thing that is time consuming in
resolving a runtime error is getting from page code back to our DOM. The
runtime errors are expressed in the page code's own variables, like:
widget is undefined on line 123
But the root cause is sure to be in the edbrowse DOM most of the time.
How do you bridge the gap in a methodical way rather than a painstaking
way with no standard way to go about it?
Apparently call stacks are available for the asking!
Here's an example from http://demos111.mootools.net/Fx.Slide
After an error occurs, page code is available from jdb in
document.scripts.
I ran one of these inside a try-catch and got:
try { eval(document.scripts[2].data)() } catch (e) { alert(e.stack) }
CSSStyleDeclaration.prototype.getPropertyValue@foo:1574
.getStyle@foo:2311
.getStyle/<@foo:2288
.getStyle@foo:2290
Element.getMany/<@foo:2624
$each@foo:1108
Element.getMany@foo:2623
.getStyles@foo:2335
Fx.Slide<.initialize@foo:4626
Class.Merge/merged@foo:461
Class/klass@foo:368
@foo:4
Element.Events.domready.add@foo:3728
Element.Methods.Events.addEvent@foo:2915
@foo:1
@foo:1
The constructions at the bottom are theirs, and the CSSStyleDeclaration at
the top is by me in startwindow and contains some sort of misphrasing.
Music to my ears, if I had known that a call stack was sitting there in e,
I would have used it a long time ago..
Kevin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-24 18:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 18:58 [Edbrowse-dev] alert(e.stack) ! Kevin Carhart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).