Opening DevTools
Similar in both the systems - Press F12
for opening the DevTools
Having a custom snippet
- Snippets are small scripts that you can write temporarily and execute within Source panel
- Chrome has the support of writing snippets whereas firefox does not support the same
- For Accessing : Go to Chrome > Sources > Right Click
more options
> selectsnippets
Flex Box & Grid Debugging
- When it comes to CSS debugging firefox is more advanced
- Flexbox and Grid are separately visible when you inspect from the firefox DevTools
- In Chrome, the only way to do this, Is by adding temporary properties in the element style column
- Whereas, In Firefox you can see a separate column for flexbox and grid debugging
Animation Debugging
CSS animations and transitions are always good to be implemented but also hard to get right, firefox has a great debugging feature with animation debugging
Where you can play/pause/rewind animations, jump to a specific point in the animation
You can also adjust the animation playback speed.
Inside Chrome
- You can play/pause/rewind the animations in chrome devtools, but you cannot manipulate them.
- Available in
More tools
>Animations
Inside Firefox
- You can play around with pause/play/rewind options
- Adjust the playback rate of each animation
Font Debugger
- Apart from the flexbox and animations, font selection is a very important property for a web page
- Firefox comes prepared with a dedicated debugger for the fonts as well, where you can use all the properties by just adjusting them with the panels
LightHouse
- Lighthouse is an open-source, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, and more.
- Open Lighthouse from DevTools and click analyze page – it’ll return an audit report based on the performance of your web page, can find which part of your performance is affected.
- You can also run Lighthouse from the command line by a node module package
npm –save lighthouse
- This is not available with firefox
Recorder
- Chrome’s new Recorder tool allows you to record and replay tests from the browser, export them as a JSON file (and more), as well as measure test performance.
- We can replay the recording whenever we want to check the flow
- Once you start recording, all the user interactions are recorded, after stopping the recording, we can replay and check the performance insight for a detailed overview of the flow
- For Accessing -
More Tools
>Recorder
Changes
- This Tab will show whatever changes we made in our code on the debugging tool.
- Changes in CSS which were done in
element.style
will be displayed under theChanges
panel. - The difference in the output will be highlighted.
- For Accessing :
ctrl
+shift
+p
then typeshow changes
, only available in chrome. - More on Developers doc
Coverage
- The Coverage Tab helps the developers to find the unused Javascript and CSS codes.
- By doing this, we can speed up our page load.
- For Accessing :
ctrl
+shift
+p
then typeshow coverage
, only available in chrome. - More on Developers doc
Issues
- The Issues tab puts on a notification in the Console indicating a problem found by the browser.
- The problems involve cookies & multiple contents accessing by the same component.
- Suggestions will be provided for enhancing the performance based on the problem.
- For Accessing :
ctrl
+shift
+p
then typeshow issues
, only available in chrome. - More on Developers doc
Memory Inspector
- Memory inspector shows us the Array Buffer and Web Assembly buffer data
- buffer is a way of handling streams of binary data where in Node.js it is available in a global object.
- ArrayBuffer is an object which represents a fixed length raw binary data buffer.
- Set a breakpoint by opening the
Sources
panel in the js file and check the memory inspector, it reveals a hexadecimal address. - For Revealing :
More options
>Memory Inspector
>Right click the breakpoint
>Reveal the memory inspector
, only available in chrome. - More on Developers doc
Network Conditions
- This Tab lets you control the network throttling speed.
- For Accessing :
ctrl
+shift
+p
then typeshow network conditions
, only available in chrome. - More on Developers doc
Network request blocking
- This feature is useful to compare pages without and with some files by blocking the request before it reaching it reaches the server.
- By doing this, you can know how your page performs when blocking resources from an entire domain.
- How to use this feature?
- Right-click on a resource in the Network Panel.
- Select Block request URL - this resource is now excluded from subsequent page loads.
- The blocked request URLs will be available under this tab for reference.
- For Accessing :
ctrl
+shift
+p
then typeshow network request blocking
, only available in chrome. - Know more here
- This feature exists only in chrome
Performance Monitor
- This feature gives you real-time performance results on CPU usage, JS heap size, event listeners and more.
- They even allow you to measure the performant of your CSS solutions.
- For Accessing :
ctrl
+shift
+p
then typeshow performance monitor
, only available in chrome. - Know more here
Rendering
- The Rendering tab comes with more features packed, It discovers rendering performance issues.
- The green box will appear on Spot painting, and layout shifts.
- We can even test pages with different CSS without manually specifying them in your code or testing environment.
- You can even apply other features such as Highlighting ad frames, emulating focus on a page, disabling local fonts and image formats, enabling an automatic dark theme, and emulating vision deficiencies.
- For Accessing :
ctrl
+shift
+p
then typeshow rendering
, only available in chrome. - More on Developer doc
Search
- We can use this tab for searching text across all loaded resources.
- The Search tab doesn't show results from network headers and responses.
- For Accessing :
ctrl
+shift
+p
then typeshow search
, only available in chrome. - More on Developer doc
Sensors
- With this feature, you can overwrite the current location and you can also simulate device orientation.
- Many websites take advantage of user location to provide a relevant experience for their users.
- So, If you're building a UI based on user location, you want to make sure the site behaves properly across the different locations.
- For Accessing :
ctrl
+shift
+p
then typeshow sensors
, only available in chrome. - More on Developers doc
Web Audio
- The Web Audio helps to monitor the web apps that use web audio API.
- Web Audio API provides a powerful system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects such as painting and much more.
- For Accessing :
ctrl
+shift
+p
then typeshow WebAudio
, only available in chrome. - More about Web Audio API
Web Authn
- Use the WebAuthn tab in Chrome DevTools to create and interact with software-based virtual authenticators.
- It's more like a virtual authentication.
- For Accessing :
ctrl
+shift
+p
then typeshow WebAuthn
, only available in chrome. - More on Developers doc
Chrome Options
Summary
Tool | Chrome | FireFox | Accessibility | Preferable |
---|---|---|---|---|
Custom snippets | ✔ | ❌ | Chrome > Sources > More options > snippets | |
Flex Box & Grid Debugging | ❌ | ✔ | Firefox > press F12 > Grid | |
Animation Debugging | ✔ | ✔ | Chrome > More tools > Animation Firefox > F12 > Animation | |
Font Debugger | ❌ | ✔ | ||
LightHouse | ✔ | ❌ | ||
Recorder | ✔ | ❌ | ||
Changes | ✔ | ❌ | ||
Coverage | ✔ | ❌ | ||
Issues | ✔ | ❌ | ||
Memory inspector | ✔ | ❌ | ||
Network conditions | ✔ | ❌ | ||
Network request blocking | ✔ | ❌ | ||
Performance monitor | ✔ | ❌ | ||
Rendering | ✔ | ❌ | ||
Search | ✔ | ❌ | ||
Sensors | ✔ | ❌ | ||
Web Audio | ✔ | ❌ | ||
Web Authn | ✔ | ❌ |
References
@ragavkumarv
swipe to next ➡️