Heh: Glad to hear you're game! Yeah, so as far as things that seem to be needed to known here: 1. Environments (I have [a post about this](https://www.mgaudet.ca/technical/2020/9/10/a-brief-note-on-environments-and-scopes-in-spidermonkey) that will help explain what they are, and how they're linked 2. How the environment iterator works, and what it means to have [`withinInitialFrame`](https://searchfox.org/mozilla-central/rev/f21850ca45036ddb84cd25aa355a6969d7c94c4f/js/src/vm/EnvironmentObject.h#799) return true. I've been asking that question in #spidermonkey; still don't have a firm answer yet, but the conversation is progressing. 3. How does the `pc` passed to `GetThisValueForDebuggerEnvironmentIterMaybeOptimizedOut` get determined, and why should we expect that the script it comes from be the same as the one determined from the environment iterator. It's worth noting, some of this stuff changed [recently](https://hg.mozilla.org/integration/autoland/rev/31d14cf1975c), which may give some hints as to how this was supposed to work. I'd also pay attention to the phabricator comments, as they're often valuable hints.
Bug 1538301 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Heh: Glad to hear you're game! Yeah, so as far as things that seem to be needed to known here: 1. Environments (I have [a post about this](https://www.mgaudet.ca/technical/2020/9/10/a-brief-note-on-environments-and-scopes-in-spidermonkey) that will help explain what they are, and how they're linked) 2. How the environment iterator works, and what it means to have [`withinInitialFrame`](https://searchfox.org/mozilla-central/rev/f21850ca45036ddb84cd25aa355a6969d7c94c4f/js/src/vm/EnvironmentObject.h#799) return true. I've been asking that question in #spidermonkey; still don't have a firm answer yet, but the conversation is progressing. 3. How does the `pc` passed to `GetThisValueForDebuggerEnvironmentIterMaybeOptimizedOut` get determined, and why should we expect that the script it comes from be the same as the one determined from the environment iterator. It's worth noting, some of this stuff changed [recently](https://hg.mozilla.org/integration/autoland/rev/31d14cf1975c), which may give some hints as to how this was supposed to work. I'd also pay attention to the phabricator comments, as they're often valuable hints.