From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 5C73C779C0 for ; Tue, 4 Jun 2019 22:20:54 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.57.137.251]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id E692E37FBA1 for ; Tue, 4 Jun 2019 22:20:53 -0700 (PDT) Received: from localhost (kevin@localhost) by carhart.net (8.15.2/8.15.2) with ESMTP id x555KqN2211302 for ; Tue, 4 Jun 2019 22:20:53 -0700 Date: Tue, 4 Jun 2019 22:20:52 -0700 (PDT) From: Kevin Carhart To: edbrowse-dev@lists.the-brannons.com Subject: [edbrowse-dev] 'this' in a breakpoint Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII I think 'this' is always returning window within a breakpoint. So if you have to echo let's say, a, where a = (this, b), I think you would get a result that didn't reflect the real run. To recreate, try it with jsrt I went to the Circle function and added an alert that produces the following: when jsrt is run with no breakpoints, what is 'this' in function Circle? [object Object] And I assigned window.preserve_this = this Then I echoed preserve_this from jdb: jdb preserve_this [object Object] ok(preserve_this) r,c,a,q Now I restored Circle, so jsrt is back to factory settings. Now I put a breakpoint in Circle and echoed 'this' at the breakpoint prompt. b base 24269 bp: this [object global] Do you think my experiment is sound and can this be alleviated? thanks Kevin