9.44. IOS application debugging

发布时间 :2025-10-25 12:23:54 UTC      

9.44.1. Brief introduction

When we do an application, we may make all kinds of mistakes, which can lead to all kinds of mistakes. Therefore, in order to fix these errors or defects, we need to debug the application.

9.44.2. Select a debugger

The debuggers in Xcode are GDB and LLDB debuggers, and GDB is the default. LLDB is a debugger that is part of LLVM’s open source compiler project. You can change debugging and edit activity plan options.

9.44.3. How do I find coding errors?

We just need to build our application, the code is compiled by the compiler, and all messages, errors and warnings will be displayed as well as the cause of the error, and we can correct them. You can click product, and then click “analyze”, the problems that may occur in the application.

9.44.4. Set breakpoint

Breakpoints help us understand our application objects and help us identify many flaws, including the different states of logical problems. We just need to click on the line number to create a breakpoint. We can delete the breakpoint by clicking and dragging it. As shown below

debug_Breakpoint

When we run the application and select playVideo, the button’s application will be paused, and let’s analyze the state of our application. When the breakpoint is triggered, we will get an output, as shown in the following figure

debug_BreakpointStop

You can easily determine which thread triggered the breakpoint. You can see objects at the bottom, such as self,sender, etc., which hold the values of the corresponding objects, and we can expand some of these objects to see what their state is.

To continue the application, we select the continue button (the leftmost button) in the debug area, as shown in the following figure. Other options include steps and step skip

image2

9.44.5. Abnormal breakpoint

We also have exception breakpoints that trigger the location where the application stops where the exception occurs. We can create an exception breakpoint by selecting the “+” button after selecting debug navigation. You will get the following window

debug_ExceptionBreakpoint

Then, we need to select the “Exception Breakpoint” breakpoint, which displays the following window

debug_ExceptionBreakpointAll

9.44.6. What’s the next step?

You can do it in the Xcode 4 用户指南 Learn more about debugging and other Xcode features.

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.