TAILIEUCHUNG - more iphone 3 development phần 10

Xcode hơn là gõ lệnh GDB trực tiếp, nhưng đối với một vài trong số những nhiệm vụ quan trọng hơn, chúng tôi sẽ cho bạn thấy làm thế nào để làm cho họ bằng cách sử dụng giao diện điều khiển chương trình gỡ rối. Giả sử bạn có hai tập tin, và | CHAPTER 15 Debugging 497 Xcode rather than typing GDB commands directly but for a few of the more important tasks we ll show you how to do them using the debugger console as well. 1 DebugMe - Debugger Console Simulator - I De. . Ã A Overview Breakpoints Build and Run Tasks Restart Pause clear Log Session started at 2009-11-24 14 59 17 -0500. 2009-11-24 14 59 DebugMe 41441 207 Look Ỉ used NSLog l Debug Me launched 0 Succeeded Figure 15-1. The debugger window is actually an interface to the command-line program GDB which is the debugger used by Xcode Breakpoints Probably the most important debugging tool in your arsenal is the breakpoint. A breakpoint is an instruction to the debugger to pause execution of your application at a specific place in your code and wait for you. By pausing but not stopping the execution of your program you can do things like look at the value of variables and step through lines of code one at a time. A breakpoint can also be set up so that instead of pausing the program s execution a command or script gets executed and then the program resumes execution. We ll look at both types of breakpoints in this chapter but you ll probably use the former a lot more than the latter. The most common breakpoint type that you ll set in Xcode is the line number breakpoint. This type of breakpoint allows you to specify that the debugger should stop at a specific line of code in a specific file. To set a line number breakpoint in Xcode you just click in the space to the left of the source code file in the editing pane. Let s do that now so you can see how it works. Single-click . Look for the method called viewDidLoad. It should be one of the first if not the first method in the file. On the left side of the editing pane you should see a column with numbers as in Figure 15-2. This is called the gutter and it s one way to set line number breakpoints. 498 CHAPTER 15 Debugging Õ 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.