Are there any documents about how to debug SpiderMonkey in js shell?

Hi all,

I’m a maintainer of SpiderMonkey mips64 port, and when I trying to debug SpiderMonkey in shell, like for jit-test failures, I often feels that I’m not familiar with debugging skills of SpiderMonkey. And after some seach, most SpiderMonkey documents that I found are about building, testing and usage.
So I wonder if there are any documents about how to debug SpiderMonkey in js shell? Like how to dump jit machine code, how to find out the machine code is which level(baseline, optimized) and how to trace gc, etc. Any information would be appreciated!

Thanks!
Zhao Jiazhong

Hey,

We definitely don’t have a definitive guide, though I wish we did. We definitely need to rescue the still relevant tips from this, now archived, MDN page

Other pointers I have, that may be helpful:

2 Likes

(Opened this bug to track rescuing that Hacking Tips page)

That page was already sort of rescued at https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Debugging%20Tips.md, but I think in-tree would be an even better place for it!

1 Like

Thanks for your information!

And I also find a useful environment variable: IONFLAGS. Not sure why don’t we provide it as a flag just like --ioneager, so people could find it by js --help? So how environment variables like this are managed? Thanks!