Đang chuẩn bị liên kết để tải về tài liệu:
Lập trình Wrox Professional Xcode 3 cho Mac OS part 61

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Hiển thị các cột Loại có lẽ là điều đầu tiên tôi làm sau khi mở cửa sổ trình gỡ rối cho thời gian rst fi. Ngoài ra, bạn có thể cũng phải / Control nhấp vào bất kỳ biến và chọn Show / Hide loại cột từ các cửa sổ pop - up trình đơn. Đáng buồn thay, Xcode không bảo quản thiết lập giữa phiên Xcode. | 460 CHAPTER 18 DEBUGGING Showing the Type column is probably the first thing I do after opening the debugger window for the first time. Alternatively you can also Right Control-click any variable and choose Show Hide Type Column from the pop-up menu. Sadly Xcode doesn t preserve this setting between Xcode sessions. There s a lot more to examining data in the debugger. This brief overview should give you some idea of what you re looking at while you progress to the more practical topic of controlling the debugger and setting breakpoints. Until you can stop your application there s no data to examine. CONTROLLING THE DEBUGGER One of the most elementary and often most effective methods of debugging an application is simply to stop it and examine its state. Look at the value of local variables and objects and see what functions have been called and in what order. You may then want to step through the code one line at a time to witness its order of execution. This rather passive method of debugging is often all that s required to determine what your code is doing wrong or unexpectedly. You control this kind of immediate and interactive debugging through a set of debugging commands. None of these commands except the Pause command is available until the debugger has suspended your application. This happens when the execution of your program encounters a breakpoint some exceptional event or when you use the Pause command. The most predictable method is to set a breakpoint. It s possible to stop your program using the Debug Pause command but it s rarely that useful. Pause stops your program wherever it is at that moment usually in some framework or kernel call. Breakpoints can do many sophisticated things and you can set them in a variety of ways all of which is covered later in the Breakpoints section. For now all you need to do is set and enable simple breakpoints by clicking in the editor pane gutter of any source file. A breakpoint appears as a blue marker that .