From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.61]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 9AE9A79657 for ; Fri, 24 Jun 2016 11:57:29 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.52.200.227]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 82ABC400A5B for ; Fri, 24 Jun 2016 11:59:00 -0700 (PDT) Received: from carhart.net (localhost [127.0.0.1]) by carhart.net (8.13.8/8.13.8) with ESMTP id u5OIwxbo011300 for ; Fri, 24 Jun 2016 11:58:59 -0700 Received: from localhost (kevin@localhost) by carhart.net (8.13.8/8.13.8/Submit) with ESMTP id u5OIwx5o011293 for ; Fri, 24 Jun 2016 11:58:59 -0700 Date: Fri, 24 Jun 2016 11:58:58 -0700 (PDT) From: Kevin Carhart To: Edbrowse-dev@lists.the-brannons.com Message-ID: User-Agent: Alpine 2.03 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: [Edbrowse-dev] alert(e.stack) ! X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.21 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2016 18:57:29 -0000 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