Yesterday was too late, today teaches you to use debug mode to analyze program execution order

Source: Internet
Author: User

Or with yesterday's XML file parsing to do chestnut, hope that through this delicious chestnut can extrapolate learn to use debug to see the source code and find bugs

There are five main types of events
Event type of Start_document:xml Header = 0
End_document:xml Tail Event Type =1
Start_tag: Event type of the start node = 2
End_tag: Event type of end node = 3
Text: The event type of the literal node = 4

Our XML file:

<?xml version= "1.0" encoding= "Utf-8"?><weather>    <city>        <name> Anyang </name>        <temp>-8℃</temp>        <pm25>120</pm25>    </city>    <city>        < Name> Beijing </name>        <temp>-12℃</temp>        <pm25>500</pm25>    </city>    <city>        <name> Shanghai </name>        <temp>2℃</temp>        <pm25>60</ Pm25>    </city></weather>

The code doesn't stick to the code that was parsed by the XML file yesterday.

1 first hit a breakpoint (double click)

2 Package---------Right-click-------------Debug as--------------Android application (no way to write a path)

3............#################

4 point Simulator on the button of our program and then see the menu bar below a line of small icons

5 We chose step Over (F6) not to enter the sub-method:

Yesterday was too late, today teaches you to use debug mode to analyze program execution order

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.