Mozilla emits JavaScript debugger for Firefox and Chrome

When it's easier to rewrite than refactor

Mozilla developers have released a new JavaScript debugger for Firefox.

It's hoped the new "Debugger.html" will replace todays XUL-based debugger, which the project's Bryan Clark describes as “incredibly hard to change”.

That may not necessarily happen, because Clark notes there's another team in Firefox that's working on refactoring the existing debugger code.

Over at the Debugger.html GitHub repo, the project team explains it's designed to be hackable and easy for other developers to use, integrating it into their projects with JavaScript package manager npm.

As well as shipping inside the Firefox nightly build, debugger.html uses the Chrome Debugging Protocol, which lets it attach to and debug Chrome tabs and Node processes.

Clark's post continues: “because it is built with reusable components we’ve demoed the debugger being embedded in an editor and running as a CLI. Even if only part of the UI components are needed, the application model still works as intended allowing for many possible opportunities of reuse.”

So it's easy to navigate the code, the debugger includes a “Sources” panel, which organises source code by folders. Other UI work includes reorganising the presentation of information about the Call Stack, Scope, and Breakpoints.

Clark has also put together a technical explainer at Mozilla Hacks, here. ®

Keep Reading

Biting the hand that feeds IT © 1998–2021