Good question.
Everything is in firefox and open source
Here are the bugs: https://bugzilla.mozilla.org/buglist.cgi?cmdtype=runnamed&na...
Here's the primary directory: https://searchfox.org/mozilla-central/source/toolkit/recordr...
The debugger API is implemented in JS here https://searchfox.org/mozilla-central/source/devtools/server...