Android WebApp Development uses genymotion connection Fiddler2 proxy debugging
Source: Internet
Author: User
<span id="Label3"></p><p><p><strong style="line-height: 1.5;">1.</strong> <strong style="line-height: 1.5;">Purpose</strong></p></p><p><p>You can use Fiddler to configure the proxy for genymotion when you encounter chrome debugging code as code or code in the browser or app hybrid development of the Emulator.</p></p><p><p>You can easily replace the code with local code, and you can also intercept the analysis for the access Service.</p></p><p><p><strong>2.</strong> <strong>configuration</strong></p></p><p><p><strong>2.1</strong> <strong>Configure fiddler</strong> <strong>Local agent</strong></p></p><p><p>2.1.1 Tools->option->connections</p></p><p><p>Select Allow remote computers to connect and set the port number (default 8888), such as:</p></p><p><p></p></p><p><p>2.1.2 Tools->option->https</p></p><p><p>Select Caputure HTTPS connects, and tick ignore server certificate errors,</p></p><p><p></p></p><p><p>2.1.3 Setting up site filtering</p></p><p><p>On the right side of the fiddler->filters, check the user Filters, after configuring the genymotion agent, access www.baidu.com,</p></p><p><p></p></p><p><p><strong>2.2</strong> <strong>Configure Genymotion</strong> <strong>Agent Parameters</strong></p></p><p><p>2.2.1 Enter WiFi settings, long press genymotion connected wifi, pop up the dialog to modify the connection parameters,</p></p><p><p></p></p><p><p>2.2.2 Setting up WiFi proxy IP and ports</p></p><p><p>Note: the proxy IP that is filled in the Android and Genymotion simulator cannot be the IP of the fiddler pc, because the emulator and PC are not in the same network segment,</p></p><p><p>By default, the Android emulator in 10.0.2.2 represents the Pc,genymotion simulator in 10.0.3.2 for PC. Genymotion settings</p></p><p><p></p></p><p><p><strong>2.3</strong> <strong>Configuring the True machine Agent parameters</strong></p></p><p><p>First connect the real machine to the same local area network where the PC resides, and the real agent IP is the IP of the PC.</p></p><p><p></p></p><p><p><strong>2.4</strong> <strong>genymotion</strong> <strong>Installing fiddler</strong> <strong>Certificate</strong></p></p><p><p>If you are accessing an HTTPS site in genymotion, you need to install the Fiddler certificate in the Emulator. When the agent is configured in the emulator, you can download the certificate by visiting the proxy Site.</p></p><p><p>Enter http:10.32.82.50:8888 (the IP and fiddler proxy port number of the Fildder Pc) in the simulator browser, and then click Fiddlerroot Certificate to download the certificate after the proxy site is Opened.</p></p><p><p>Because of the agent set up on wifi, choose WiFi here.</p></p><p><p></p></p><p><p></p></p><p><p><strong>3.</strong> <strong>Configure the local site</strong></p></p><p><p><strong>3.1</strong> <strong>Configure IIS</strong> <strong>site</strong></p></p><p><p>Configure a site path that is consistent with the on-line environment, such as Https://secure.ctrip.com/webapp/wallet on the online path,</p></p><p><p>The specific configuration diagram is as Follows:</p></p><p><p></p></p><p><p>After the configuration is complete, bind the HTTPS 443 port to the local site, where you need to make a local self-signed https Certificate.</p></p><p><p></p></p><p><p></p></p><p><p><strong>3.2</strong> <strong>Configure host</strong> <strong>file</strong></p></p><p><p>Replace the online domain name with the cost machine in the host File.</p></p><p><p></p></p><p><p><strong>4. </strong> <strong>genymotion</strong> <strong>in-app</strong> <strong>Access Test (</strong><strong>Ctrip Hybridapp dedicated, others see 5th)</strong></p></p><p><p>The debug code in the app needs to rely on the Lizard grunt wrapper, which commands the Following:</p></p><p><p>Grunt Package2.0--path=%wallet_app%\wallet--debug</p></p><p><p>When using debug packaging, you need to modify the relevant configuration in the gruntcfg.js, primarily the host parameter, and configure the machine IP and Port. such as Host: "10.32.82.50:80".</p></p><p><p>The host parameter is primarily the site where WebResource is configured for package generation, and the debug mode package does not generate the WebResource directory, but instead directly points the route to the native WebResource path in lizardlocalroute.js.</p></p><p><p>Push the package-generated files into the emulator to Debug.</p></p><p><p></p></p><p><p>Home Debug Source:</p></p><p><p></p></p><p><p>Fiddler interception information:</p></p><p><p></p></p><p><p><strong>5. </strong> <strong>genymotion</strong> <strong>in browser test (all WebApp Available)</strong></p></p><p><p></p></p><p><p>Home Debug Source:</p></p><p><p></p></p><p><p>Fiddler interception information:</p></p><p><p></p></p><p><p><strong>6.</strong> <strong>Conclusion</strong></p></p><p><p>Through the above configuration, you can basically solve the debugging process encountered in the code confusion problem, but also you a familiar code Environment.</p></p><p><p>Android WebApp Development uses genymotion connection Fiddler2 proxy debugging</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service