Program debugging Optimization One: browser-side view, crawl back data in the background method

Source: Internet
Author: User
Tags json

1, in the application development, click on a button or a link, the page response results and we expect the result is not the same, we can be in the background application break point, Debug debugging, can also be viewed through the browser, crawl back data in the background.

2, how to view and crawl through the browser.
The browser I'm using is Google Chrome.
The following figure, I click the Query button.

First, enter the debugging interface
Before you click the button, go to the browser's debug screen.
Browser Debug Interface Way (under Windows, direct F12, I use Mac):
Mode 1: In the browser page blank, click the Left button, and then click "Review Element", you can enter the modal page;

Mode 2: Point to the top right corner of the browser,,–> more tools –> developer tools.
The Debug page is shown below:

Second, the debugging interface to view, crawl data
How to view and crawl data.
The following figure:
The first step: Point Query button;
The second step: Point Network tab;
The third step: Point getalluser.do link;

The request status can be viewed in the following diagram:
See the Headers tab at the bottom of the figure below, view the status status Code:200 OK, and view the request header information.

Then click Response tab to view the data of the background response.


We can also copy the JSON data here and find a JSON online format

Third, using the JSON Online parsing tool, format the JSON data
With this JSON online parsing tool, we can view and analyze the data captured in the background more clearly in the image below.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.