We have already published the post about capturing browser logs for finding out the errors on any website or web application. In this post, you will learn about another method of collecting logs for getting fixed the errors found on any website or web application. It will be easier to find out the fault if you are able to see what is being sent and received by your web browser. There is a cross-platform application called Charles Proxy that will record all the traffic that is sent and received between the client and server.
It will make easy to see and troubleshoot the issues that are generated while testing the software. This software is freely available although the free version does not run more than 3o minutes at a time. It also included with most advanced features such as viewing SSL requesting plain text, simulating slower internet connections and viewing XML and JSON requests and responses. This software is available for all of the available OS such as Windows, Mac, and Linux. In this post we are going to explain in detail about installing, setting up and recording the logs through Charles proxy on windows only.
Installing Charles Proxy on Windows
Use the following steps to install Charles proxy on windows.
- At first, go to the download page of the Charles proxy website from here.
- Download any of the MSI files for your 32 or 64-bit windows.
- Open the installation file and click on Next when the dialog box appears.
- Accept the terms in the License Agreement and go next.
- Choose the required folder for installation of the application.
- Now, click on Install to begin installing.
Setting up the Application for Recording Logs
Now, you have to set up the application for recording logs.
- Go to proxy menu and click on windows proxy or press Ctrl+Shift+P.
- Now, go to help menu, click on SSL proxying and then click on Install Charles root certificate.
- Click on Install certificate button located under the general tab.
- Choose the store location “current user” and click next.
- Choose the second option “Place all certificates in the following store” and click on Browser button.
- Select “Trusted Root Certification Authorities” and go next to complete the wizard.
- Now, click on Yes when confirmation message appears.
- Click on OK until the certificate dialog box closes.
- To verify the certificate after successfully installed, open certificate dialog box as mentioned in step 2.
- Go to the certification path tab and observe the certificate status “This certificate is OK”.
- To enable SSL proxy for SSL enabled web applications, go to the proxy menu and click on SSL Proxying settings.
- Click on Add button and enter the name of the domain or port number. Where domain name can be used with * symbol and the port number. For the websites with SSL certificate, the port number will be 443.
- Click on OK to close the dialog box.
Recording Logs with Charles Proxy
- When all the setup completes, go to file menu, click on the New session and click on start recording.
- You will see the blue circle on the website link while recording the log.
- Click on the stop to stop the recording
- To save recorded log, go to file menu and click on save.
Removing Installed Root Certificate
Use the following steps if you want to remove Installed Root certificate after recording log.
- Search “certmgr.msc” from windows search and press enter.
- Open “Trusted Root Certification Authorities” folder and click on certificates.
- Search for Charles Proxy certificate and delete it.