A new stable Firefox version is rolling out. Version 77 comes with a few new features for web developers.
This blog post provides merely a set of highlights; for all the details, check out the following:
Let’s start by reviewing the most interesting Developer Tools improvements and additions for 77. If you like to see more of the work in progress to give feedback, getFirefox DevEdition for early access.
Large web apps can provide a challenge for DevTools as bundling, live reloading, and dependencies need to be handled fast and correctly. With 77, Firefox’s Debugger learned a few more tricks, so you can focus on debugging.
After we improved debugging performance over many releases, we did run out of actionable, high-impact bugs. So to find the last remaining bottlenecks, we have been actively reaching out to our community. Thanks to many detailed reports we received, we were able to land performance improvements that not only speed up pausing and stepping but also cut down on memory usage over time.
Stepping is a big part of debugging but not intuitive. You can easily lose your way and overstep when moving in and out of functions, and between libraries and your own code.
The debugger will now respect the currently selected stack whenstepping. This is useful when you’ve stepped into a function call or paused in a library method further down in the stack. Just select the right function in theCall Stack to jump to its currently paused line and continue stepping from there.
We hope that this makes stepping through code execution more intuitive and less likely for you to miss an important line.
Understanding state changes is a problem that is often investigated by console logging or debugging.Watchpoints, which landed in Firefox 72, can pause execution while a script reads a property or writes it. Right-click a property in the Scopes panel when paused to attach them.
ContributorJanelle deMent made watchpoints easier to use with a new option that combines get/set, so any script reference will trigger a pause.
Step by step over each release, the Network details panels have been rearchitected. The old interface had event handling bugs that made selecting and copying text too flaky. While we were at it, we also improved performance for larger data entries.
This is part of a larger interface cleanup in the Network panel, which we have been surveying our community about via @FirefoxDevTools Twitter and Mozilla’s Matrix community . Join us there to have your voice heard. More parts of the Network-panel sidebar redesign are also available inFirefox DevEdition for early access.
Firefox 77 supports a couple of new web platform features.
Firefox 67 introduced
String#matchAll , a more convenient way to iterate over regex result matches. In Firefox 77 we’re adding more comfort:
String#replaceAll helps with replacing all occurrences of a string – an operation that’s probably one of those things you have searched for a thousand times in the past already (thanks StackOverflow for being so helpful!).
Previously, when trying to replace all cats with dogs, you had to use a global regular expression
Or, you could usesplit andjoin:
Now, thanks toString#replaceAll, this becomes much more readable:
Firefox 77 exposes the request that anIDBCursor originated from as an attribute on that cursor . This is a nice improvement that makes it easier to write things like wrapper functions that “upgrade” database features. Previously, to do such an upgrade on a cursor you’d have to pass in the cursor object and the request object that it originated from, as the former is reliant on the latter. With this change, you now only need to pass in the cursor object, as the request is available on the cursor.
Since Firefox 57, users see the permissions an extension wants to access during installation or when any new permissions are added during an update. The frequency of these prompts can be overwhelming, and failure to accept a new permission request during an extension’s update can leave users stranded on an old version. We’re making it easier for extension developers to avoid triggering as many prompts by making more permissions available asoptional permissions. Optional permissions don’t trigger a permission request upon installation or when they are added to an extension update, and can also berequested at runtime so users see what permissions are being requested in context.
Visit theAdd-ons Blog to see more updates for extensions in Firefox 77!
These are the highligts of Firefox 77! Check out the new features and have fun playing! As always, feel free to give feedback and ask questions in the comments.
Florian is the Content Lead for MDN Web Docs, writes about Web platform technologies and researches browser compatibility data. He lives in Bremen, Germany.
Harald "digitarald" Kirschner is a Product Manager for Firefox's Developer Experience and Tools – striving to empower creators to code, design & maintain a web that is open and accessible to all. During his 8 years at Mozilla, he has grown his skill set amidst performance, web APIs, mobile, installable web apps, data visualization, and developer outreach projects.