tailieunhanh - Lập trình Wrox Professional Xcode 3 cho Mac OS part 58
Chạy ứng dụng của bạn bắt đầu ứng dụng của bạn dưới sự kiểm soát của các trình gỡ rối Thiết lập các điểm ngắt và tạo điểm ngắt thông minh Xem xét, thay đổi, và tùy biến màn hình hiển thị của các biến Debugging một chương trình chạy trên một hệ thống từ xa | 18 Debugging WHAT S IN THIS CHAPTER Running your application Starting your application under the control of the debugger Setting breakpoints and creating smart breakpoints Examining changing and customizing the display of variables Debugging a program running on a remote system Getting your project to build is sometimes only half the battle. OK let s be honest it s often much less than half the battle. It s a cruel fact of programming that your application will have bugs design flaws and unexpected behavior. Object-oriented languages modeling good design rigorous coding standards and unit testing can reduce the number of bugs that creep into your code but unless your application is trivial it doesn t matter how careful you ve been how many code reviews you ve done or how many best practices you ve employed. Someday your application is simply not going to work the way you want it to and you ll have to find out why. The tool of choice to answer that question is the debugger. The debugger is a magic window into your application. You can literally watch the internals of your program at work. You can stop your application examine the values of variables the state of other threads and much more. Xcode even allows you to alter values and fix some code while your application is still running the equivalent of performing a heart transplant on an athlete who s in the middle of running a marathon. Download at 438 CHAPTER 18 DEBUGGING RUNNING YOUR APPLICATION Before getting into debugging this section covers the trivial case of simply running your application. You can launch your program more or less as it would be launched from the Finder or shell using these commands Build Build and Run Command Return Build Build and Run - Breakpoints Off Command R Run Run Option Command Return Run Run - Breakpoints Off Option Command R All of these commands launch the active executable produced by the most recent build. You choose the active executable much as you do the .
đang nạp các trang xem trước