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