Debugging Local Mobile Pages on Android Phone Using Chrome Developer Tools
Tags: showdev, debug, devops, chrome
Published: 2022-07-07 10:49:55

While developing a mobile web application, device or browser issue are very common. iOS sumiltaor and android emulator plugins or built in emulators in browsers can be used to deal with them, but often bugs are faced by developers that occur in actual devices, not in emulators. The best way to deal with them is to debug the application directly in the device. Remote debugging is a feature that allows you to debug the application in your mobile the same way as done in desktop. Let’s take a deep dive towards how to execute the process.

***Also, check out about [HEX to RGB converter online](https://www.lambdatest.com/free-online-tools/convert-hex-color-to-rgb?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=free_tools)- It is a free online tool to convert your HEX color values to RGB color values. The red color level can be obtained by converting the leftmost two digits of the hexadecimal color code to decimal value. The green color level can be obtained by converting the middle two digits of the hexadecimal color code to decimal value.***

## What Will You Need

The requirements are very simple and the system can be configured easily without purchasing any extra software or hardware. For your PC you will need

* Chrome version 32 or above installed and properly working.

* If you are using Windows, USB drivers are required.

* A USB cable to connect your Android device with the desktop or laptop.

For the Android device, the following things are required.

* Latest version of Google Chrome.

* Android version 4 or above.

* USB debugging enabled in the developer options for Android.

The last requirement is a bit tricky. We will cover it in the following section.

## How to Enable USB Debugging in Android

If you are using Android 4.0 and 4.1,

* Go to Settings

* Navigate to Developer Options and enable it

* Once Developer Option is enabled, you will be able to see the USB Debugging checkbox.

* Scroll to the checkbox and check it

* A pop-up notification will appear informing that you are now a developer.

The process is a bit complicated in Kitkat or other higher versions.

* Navigate to settings and go to About Phone option

* A new window will open. Scroll to the bottom and you will be able to see the Build Number.

* Tap it 7 times. In the lower section of the page you will get a pop-up that you are now a developer.

* After going back, you will be able to access the Developer Options menu.

* The rest is same, check USB debugging, and you are done.

***Check out [RGB to HEX converter online](https://www.lambdatest.com/free-online-tools/convert-rgb-color-to-hex?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=free_tools)- It is a free online tool to convert your RGB color values to HEX color values. There are 3 different input values for Red, Green and Blue which range from 0 to 255. These are then used to convert those values into a hexadecimal string which can be used to specify colors in html/css code.***

## Setup Localhost on your Desktop

If your website is in Angular or any other framework, hosting it locally will not a problem. Recent versions of Angular use NPM for code building and once executed, it automatically configures a proxy server and hosts the application on your local machine which can be browsed via [http://localhost:8080](http://localhost:8080/).

If you are developing a normal website without any advanced JS framework, you will need to create a proxy server on your workstation. This can be done by using WAMPServer, which comes with the latest versions of PHP, Apache and MySQL. Once installed, WampServer will create a directory under which, project folders can be created. The sites can be directly previewed at localhost once development is completed.

![](https://cdn-images-1.medium.com/max/2000/1*qJJK_-4mTcbl6MsSnfgpHg.png)

## Connect Both Devices

Make sure that the Android device, as well as your workstation, are connected to the same Wi-Fi network. Even if you don’t have a Wi-Fi network, you can use USB tethering to connect both the devices.

## Find Your Workstation Details

You can view your locally hosted website on your [Android Emulator](https://www.lambdatest.com/android-emulator-online?utm_source=devto&utm_medium=organic&utm_campaign=sep14_kj&utm_term=kj&utm_content=webpage) using either your computer’s IP address or hostname. To find your IP address

* Go to the control panel

* Search for “adapter” and click on it

* Go to “view network connections”

* Select Active Network and navigate to “view status”

* Click on “details” and you will be able to view the IP Address next to IPv4 address.

There is also an easier alternative

* Click the “Start” button and go to run

* Type “cmd” and press enter

* The command prompt screen will appear. Type ipconfig and press enter

* You will get your IP address prompted on the black screen along with default gateway and subnet mask.

There is however, one drawback of using IP address. Every time you change the network, it gets changed and you have to search for it again. A better alternative is to use the Hostname. It can be found easily by

* Clicking on “Start“ button

* Right click on “My Computer” and go to properties

* In the Computer Name tab, you will find the Hostname for your workstation

![](https://cdn-images-1.medium.com/max/2000/1*jtZ_29vIkiXDrNDLipefAw.png)

***Look onto [URL decode](https://www.lambdatest.com/free-online-tools/url-decode?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=free_tools)- Url Decoder decodes web addresses from ASCII to human-readable format. URL Decode tool converts special HTML characters into a standard URL that can be used for links on a page. This is helpful when you have built a website with HTML and want to share an address without having to reveal the special characters in your web address.***

## Viewing Locally Hosted Websites in Android

The final step is easy. Open Google Chrome on your mobile and type the IP Address or the hostname on the address bar of the browser. You will be able to view the content of the localhost on your mobile browser. Navigate to the site which you hosted on your workstation and you will be able to view the contents and test it on a mobile device.

## Testing Locally Hosted Pages on LambdaTest

While doing the above process is not very difficult, it is still a little cumbersome and is prone to errors. A easier way is to test on [LambdaTest cross browser compatibility testing platfor](https://www.lambdatest.com/?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=blog)m. At LambdaTest you get instant on-demand access to android mobile browsers where you can run and debug your pages. In addition these browsers comes with integrated chrome developer tools that can be launched by a click of a button. You can connect you system with LambdaTest cloud platform via simple SSH protocol based tunnel application and test your locally or privately hosted webpages on LambdaTest app.

LambdaTest is free to signup and use. So do tryout LambdaTest first before you try above method :P.

Viewing a locally hosted website in Android device is very beneficial in the current age of digital transformation. People are using mobile devices for browsing and surfing webpages. Often developers and testers test [mobile view of website ](https://www.lambdatest.com/lt-browser?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=blog)using browser emulators. The results of which are often inaccurate. Real time issues on Android devices are not observed often on emulators. For perfect User Experience testing, it is always helpful to test your application on an Android device before it is deployed into production.

{% youtube Dd20hZhY44E %}

You can also subscribe to the LambdaTest YouTube Channel and stay updated with the latest tutorials around [Playwright](https://www.lambdatest.com/playwright-testing?utm_source=devto&utm_medium=organic&utm_campaign=sep14_kj&utm_term=kj&utm_content=webpage), [Selenium](https://www.lambdatest.com/selenium?utm_source=devto&utm_medium=organic&utm_campaign=sep14_kj&utm_term=kj&utm_content=webpage) testing, [Cypress testing](https://www.lambdatest.com/cypress-testing?utm_source=devto&utm_medium=organic&utm_campaign=sep14_kj&utm_term=kj&utm_content=webpage), CI/CD, and more.

## 100+ Free Online Tools From LambdaTest!

LambdaTest has come up with an index of [100+ free online tools ](https://www.lambdatest.com/free-online-tools?utm_source=medium&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=blog)for developers and testers. From HTML, XML, and JSON formatters to robust data generators, and hash calculators. LambdaTest’s free online tools are built to help engineering teams accelerate and be more productive with their daily activities.

**Code Tidy**

* [JSON Prettify](https://www.lambdatest.com/free-online-tools/json-prettify?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=blog)

* [JSON Minify](https://www.lambdatest.com/free-online-tools/json-minify?utm_source=devto&utm_medium=organic&utm_campaign=jul07_kj&utm_term=kj&utm_content=blog)

* [HTML Prettify](https://www.lambdatest.com/free-online-tools/html-prettify?utm_source=medium)

* [HTML Minify](https://www.lambdatest.com/free-online-tools/html-minify?utm_source=medium)

* [JavaScript Minify](https://www.lambdatest.com/free-online-tools/js-minify?utm_source=medium)

* [CSS Minify](https://www.lambdatest.com/free-online-tools/css-minify?utm_source=medium)

* [CSS Prettify](https://www.lambdatest.com/free-online-tools/css-prettify?utm_source=medium)

* [XML Minify](https://www.lambdatest.com/free-online-tools/xml-minify?utm_source=medium)

* [XML Prettify](https://www.lambdatest.com/free-online-tools/xml-prettify?utm_source=medium)

**Data Format**

* [IDN Encode](https://www.lambdatest.com/free-online-tools/idn-encode)

* [IDN Decode](https://www.lambdatest.com/free-online-tools/idn-decode)

* [XML to JSON Converter](https://www.lambdatest.com/free-online-tools/xml-to-json-converter)

* [JSON to XML Converter](https://www.lambdatest.com/free-online-tools/json-to-xml-converter)

* [BCD to Decimal](https://www.lambdatest.com/free-online-tools/bcd-to-decimal)

* [HEX to Decimal](https://www.lambdatest.com/free-online-tools/hex-to-decimal)

* [Decimal to BCD](https://www.lambdatest.com/free-online-tools/decimal-to-bcd)

* [UTF8 Decode](https://www.lambdatest.com/free-online-tools/utf8-decode)

* [UTF8 Encode](https://www.lambdatest.com/free-online-tools/utf8-encode)

* [HEX to RGB Converter](https://www.lambdatest.com/free-online-tools/convert-hex-color-to-rgb)

* [RGB to HEX Converter](https://www.lambdatest.com/free-online-tools/convert-rgb-color-to-hex)

* [HTML to Markdown Converter](https://www.lambdatest.com/free-online-tools/html-to-markdown-converter)

* [Markdown to HTML Converter](https://www.lambdatest.com/free-online-tools/markdown-to-html-converter)

* [Decimal to Gray Code Converter](https://www.lambdatest.com/free-online-tools/decimal-to-gray-code)

* [Gray Code to Decimal](https://www.lambdatest.com/free-online-tools/gray-to-decimal)

* [URL Decode](https://www.lambdatest.com/free-online-tools/url-decode)

* [URL Encode](https://www.lambdatest.com/free-online-tools/url-encode)

* [Base64 Encode](https://www.lambdatest.com/free-online-tools/base64-encode)

* [Base64 Decode](https://www.lambdatest.com/free-online-tools/base64-decode)

* [Text to HTML Entities Converter](https://www.lambdatest.com/free-online-tools/text-to-html-entities-convertor)

* [HTML Entities to Text Converter](https://www.lambdatest.com/free-online-tools/html-entities-to-text-converter)

**Random Data**

* [Random JSON Generator](https://www.lambdatest.com/free-online-tools/random-json-generator)

* [Random XML Generator](https://www.lambdatest.com/free-online-tools/random-xml-generator)

* [Random CSV Generator](https://www.lambdatest.com/free-online-tools/random-csv-generator)

* [Random YAML Generator](https://www.lambdatest.com/free-online-tools/random-yaml-generator)

* [Placeholder Image Generator](https://www.lambdatest.com/free-online-tools/placeholder-image-generator)

* [Random Binary Generator](https://www.lambdatest.com/free-online-tools/random-binary-generator)

* [Random Character Generator](https://www.lambdatest.com/free-online-tools/random-character-generator)

* [Random Color Generator](https://www.lambdatest.com/free-online-tools/random-color-generator)

* [Random Date Generator](https://www.lambdatest.com/free-online-tools/random-date-generator)

* [Random Decimal Fraction Generator](https://www.lambdatest.com/free-online-tools/random-decimal-fraction-generator)

* [Random Decimal Generator](https://www.lambdatest.com/free-online-tools/random-decimal-generator)

* [Random GUID Generator](https://www.lambdatest.com/free-online-tools/random-guid-generator)

* [Random HEX Generator](https://www.lambdatest.com/free-online-tools/random-hex-generator)

* [Random Octal Generator](https://www.lambdatest.com/free-online-tools/random-octal-generator)

* [Random IP Generator](https://www.lambdatest.com/free-online-tools/random-ip-generator)

* [Random MAC Generator](https://www.lambdatest.com/free-online-tools/random-mac-generator)

* [Random Number Generator](https://www.lambdatest.com/free-online-tools/random-number-generator)

* [Random Paragraph Generator](https://www.lambdatest.com/free-online-tools/random-paragraph-generator)

* [Random Password Generator](https://www.lambdatest.com/free-online-tools/random-password-generator)

* [Random Time Generator](https://www.lambdatest.com/free-online-tools/random-time-generator)

* [Random UUID Generator](https://www.lambdatest.com/free-online-tools/random-uuid-generator)

* [Random Sentence Generator](https://www.lambdatest.com/free-online-tools/random-sentence-generator)

* [Random String Generator](https://www.lambdatest.com/free-online-tools/random-string-generator)

* [Random Word Generator](https://www.lambdatest.com/free-online-tools/random-word-generator)

* [Random Data from RegEXP](https://www.lambdatest.com/free-online-tools/random-data-from-regexp)

* [Test Data Generator](https://www.lambdatest.com/free-online-tools/test-data-generator)

* [Lorem Ipsum Generator](https://www.lambdatest.com/free-online-tools/lorem-ipsum-generator)

* [Credit Card Number Generator](https://www.lambdatest.com/free-online-tools/credit-card-number-generator)

* [QR Code Generator](https://www.lambdatest.com/free-online-tools/qr-code-generator)

* [Random Byte Generator](https://www.lambdatest.com/free-online-tools/random-byte-generator)

**Security Tools**

* [Hash Calculator](https://www.lambdatest.com/free-online-tools/hash-calculator)

* [Hash MAC Generator](https://www.lambdatest.com/free-online-tools/hash-mac-generator)

* [CRC32 Hash Calculator](https://www.lambdatest.com/free-online-tools/crc32-hash-calculator)

* [CRC32B Hash Calculator](https://www.lambdatest.com/free-online-tools/crc32b-hash-calculator)

* [Ripe MD 128 Hash Calculator](https://www.lambdatest.com/free-online-tools/ripemd128-hash-calculator)

* [Ripe MD 160 Hash Calculator](https://www.lambdatest.com/free-online-tools/ripemd160-hash-calculator)

* [Ripe MD 256 Hash Calculator](https://www.lambdatest.com/free-online-tools/ripemd256-hash-calculator)

* [Ripe MD 320 Hash Calculator](https://www.lambdatest.com/free-online-tools/ripemd320-hash-calculator)

* [MD2 Hash Calculator](https://www.lambdatest.com/free-online-tools/md2-hash-calculator)

* [MD4 Hash Calculator](https://www.lambdatest.com/free-online-tools/md4-hash-calculator)

* [Adler32 Hash Calculator](https://www.lambdatest.com/free-online-tools/adler32-hash-calculator)

* [Gost Hash Calculator](https://www.lambdatest.com/free-online-tools/gost-hash-calculator)

* [Whirlpool Hash Calculator](https://www.lambdatest.com/free-online-tools/whirlpool-hash-calculator)

* [MD5 Hash Calculator](https://www.lambdatest.com/free-online-tools/md5-hash-calculator)

* [SHA1 Hash Calculator](https://www.lambdatest.com/free-online-tools/sha1-hash-calculator)

* [SHA256 Hash Calculator](https://www.lambdatest.com/free-online-tools/sha256-hash-calculator)

* [SHA384 Hash Calculator](https://www.lambdatest.com/free-online-tools/sha384-hash-calculator)

* [SHA512 Hash Calculator](https://www.lambdatest.com/free-online-tools/sha512-hash-calculator)

**Utils**

* [Find and Replace String](https://www.lambdatest.com/free-online-tools/find-and-replace-string)

* [HTML Escape](https://www.lambdatest.com/free-online-tools/html-escape)

* [HTML Unescape](https://www.lambdatest.com/free-online-tools/html-unescape)

* [Difference Checker](https://www.lambdatest.com/free-online-tools/difference-checker)

* [Shuffle Letters](https://www.lambdatest.com/free-online-tools/shuffle-letters)

* [Shuffle Text Lines](https://www.lambdatest.com/free-online-tools/shuffle-text-lines)

* [Sorting List](https://www.lambdatest.com/free-online-tools/sorting-list)

* [Split Your String](https://www.lambdatest.com/free-online-tools/string-split-by-delimiter)

* [Text Lowercase](https://www.lambdatest.com/free-online-tools/text-lowercase)

* [Text Uppercase](https://www.lambdatest.com/free-online-tools/text-uppercase)

* [Text Repeater](https://www.lambdatest.com/free-online-tools/text-repeater)

* [Text Rotator](https://www.lambdatest.com/free-online-tools/text-rotater)

* [Character Count](https://www.lambdatest.com/free-online-tools/character-count)

* [Word Count](https://www.lambdatest.com/free-online-tools/word-count)

* [Lines Count](https://www.lambdatest.com/free-online-tools/lines-count)

* [Sentence Count](https://www.lambdatest.com/free-online-tools/sentence-count)

* [URL Parse](https://www.lambdatest.com/free-online-tools/url-parse)

* [JSON Escape](https://www.lambdatest.com/free-online-tools/json-escape)

* [JSON Unescape](https://www.lambdatest.com/free-online-tools/json-unescape)

* [Extract Text from HTML](https://www.lambdatest.com/free-online-tools/extract-text-from-html)

* [Extract Text from JSON](https://www.lambdatest.com/free-online-tools/extract-text-from-json)

* [Extract Text from XML](https://www.lambdatest.com/free-online-tools/extract-text-from-xml)

* [Strip HTML](https://www.lambdatest.com/free-online-tools/strip-html)

* [JSON Validator](https://www.lambdatest.com/free-online-tools/json-validator)