The use of the IOS Sprite Kit Tutorial Help documentation and debugging programs

Source: Internet
Author: User

Help documentation for using the iOS Sprite kit tutorial and debugging programs in iOS

There are a number of ways you might encounter writing code. If the developer is not familiar with the functionality of these methods and the parameters, they can use the help documentation. So how does the help text open and find the relevant content? The following will solve these problems for you.

1. Open the Help document

To use the Help text, you must open it. Select help| The documentation and API Reference command, shown in 1.73, can be opened, as shown in Help document 1.74.

 

Figure 1.73 Opening the help document

Figure 1.74 Help documentation

2. Find

If you want to find a method, you can enter this method in the search field, as shown in 1.75. After you enter, you can find the appropriate content.

Figure 1.75 Searching for content

iOS program debugging

In programming, debugging is not necessary. debugging, also known as troubleshooting, is a process of discovering and reducing program errors. There are several steps you need to implement to debug in Xcode:

1. Add a Breakpoint

Before you can debug a program, you need to add a breakpoint to the program first. Breakpoints are places where the debugger stops the program and allows developers to see it. Move the cursor to where you want to add a breakpoint, press and hold the Command+\ key, or select Degbug| in the menu bar. breakpoints| Add breakpoint at the current command adds a breakpoint and then sees a blue arrow at the far left of the Add breakpoint code, which is a new breakpoint, shown in 1.76.

Figure 1.76 Adding a breakpoint

2. Running the program

When you click the Run button, the program runs, and the running program stays at the location where the breakpoint is located, and the code line appears with a green arrow indicating where the program is now running, as shown in 1.77. Not only that, but the iOS emulator will also be displayed, but there is no content.

Figure 1.77 Running the program

3. Breakpoint Navigation

After the program stops, the Program Debugging Information window will appear, which shows some debugging information. At the top of the Program Debugging Information window, a breakpoint navigation appears, as shown in 1.78.

Figure 1.78 Navigation

    • Q Toggle Global Breakpoint state button: Select the thread you want to view.
    • Q Continue Program execution button: Resumes execution of the current code and stops at the next breakpoint if there is a next breakpoint.
    • Q Step over button: Executes the next code. If the current row is a method call, it does not go inside the method.
    • Q Step into button: Enter the method content.
    • Q Step out button: Skips the current method, i.e. executes to the end of the current method.

At this point, click the Continue Program execution button in the Breakpoint Navigator to continue executing the current code. If there is an error at this point, the program will not jump to the next breakpoint, or the program will continue to execute if there is no problem. Now there is only one breakpoint, click this button and the program will output the final result.

4. Delete or discard breakpoints

If the program is not a problem, then the breakpoints set in the program should be deleted or discarded. There are three ways to remove a breakpoint long:

    • Q Right-click on the Set breakpoint and select the Delete Breakpoint command from the popup shortcut menu.
    • Q Select the line that sets the breakpoint and select Debug| in the Xcode menu bar breakpoints| Remove Breakpoint at the current command.
    • Q Select a breakpoint and drag it somewhere else. At this point, the breakpoint is deleted.

To discard a breakpoint, click the breakpoint. At this point, the breakpoint is changed from dark blue to light blue. A light blue breakpoint indicates that the breakpoint has been discarded, as shown in 1.79.

Figure 1.79 Obsolete Breakpoint

This article is selected from:iOS Game Frame Sprite Kit Basic Tutorial--swift version of the University PA Internal information, reproduced please indicate the source, respect the technology respect the IT person!

Use the Help documentation and debuggers for the IOS Sprite Kit tutorial

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.