How can I simulate mobile devices and debug in Firefox Browser?

FirefoxMobilePlugins

Firefox Problem Overview


I would like to be able to view and debug my website in mobile device mode on a computer. Also I want to debug my website with tools like Firebug or ... even better I can use Firebug. What is an established solution to do that?

Firefox Solutions


Solution 1 - Firefox

You can use tools own browser (Firefox, IE, Chrome...) to debug your JavaScript.

As for resizing, Firefox/Chrome has own resources accessible via Ctrl + Shift + I OR F12. Going tab "style editor" and clicking "adaptive/responsive design" icon.

Old Firefox versions

Old Firefox

New Firefox/Firebug

Firefox

Chrome

Chrome

*Another way is to install an addon like "Web Developer"

Solution 2 - Firefox

Use the Responsive Design Tool using Ctrl + Shift + M.

Solution 3 - Firefox

Most web applications detects mobile devices based on the HTTP Headers.

If your web site also uses HTTP Headers to identify mobile device, you can do the following:

  1. Add Modify Headers plug in to your Firefox browser ( https://addons.mozilla.org/en-US/firefox/addon/modify-headers/ )
  2. Using plugin modify headers:
  • select Headers tab-> select Action 'ADD'
  • to simulate e.g. iPhone add a header with name User-Agent and value: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3
  • click 'Add' button
  1. After that you should be able to see mobile version of you web application in Firefox and use Firebug plugin.

Hope it helps!

Solution 4 - Firefox

You could use the Firefox add-on User Agent Overrider. With this add-on you can use whatever user agent you want, for examlpe:

Firefox 28/Android: Mozilla/5.0 (Android; Mobile; rv:28.0) Gecko/24.0 Firefox/28.0

If your website detects mobile devices through the user agent then you can test your layout this way.


Update Nov '17:

Due to the release of Firefox 57 and the introduction of web extension this add-on sadly is no longer available. Alternatively you can edit the Firefox preference general.useragent.override in your configuration:

  1. In the address bar type about:config
  2. Search for general.useragent.override
  3. If the preference doesn't exist, right-click on the about:config page, click New, then select String
  4. Name the new preference general.useragent.override
  5. Set the value to the user agent you want

Solution 5 - Firefox

I would use the "Responsive Design View" available under Tools -> Web Developer -> Responsive Design View. It will let you test your CSS against different screen sizes.

Solution 6 - Firefox

You can use the already mentioned built in Responsive Design Mode (via dev tools) for setting customised screen sizes together with the Random Agent Spoofer Plugin to modify your headers to simulate you are using Mobile, Tablet etc. Many websites specify their content according to these identified headers.

As dev tools you can use the built in Developer Tools (Ctrl + Shift + I or Cmd + Shift + I for Mac) which have become quite similar to Chrome dev tools by now.

Solution 7 - Firefox

I think it's better to use the chrome toggle device toolbar with the chrome inspector. It provides you a user agent switch along with responsive mode. enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser1433439View Question on Stackoverflow
Solution 1 - FirefoxPiLHAView Answer on Stackoverflow
Solution 2 - FirefoxmarioView Answer on Stackoverflow
Solution 3 - FirefoxKristyView Answer on Stackoverflow
Solution 4 - FirefoxAndreasView Answer on Stackoverflow
Solution 5 - FirefoxmshindalView Answer on Stackoverflow
Solution 6 - FirefoxJHannesView Answer on Stackoverflow
Solution 7 - FirefoxJaison JamesView Answer on Stackoverflow