The devtools is built around a client/server architecture because the tools run outside of the process it debugs. This protocol is documented extensively in the [Remote Debugging Protocol](https://wiki.mozilla.org/Remote_Debugging_Protocol) wiki page.