Lập trình iphone chuyên nghiệp part 24

Testing and Debugging Do tính chất không đồng nhất của các ứng dụng Web, gỡ lỗi luôn luôn là thách thức, đặc biệt là khi cố gắng làm việc với phía máy khách JavaScript. Để giải quyết nhu cầu này, công cụ gỡ lỗi khá tinh vi đã nổi lên trong vài năm qua trong cộng đồng phát triển, đáng chú ý nhất Firebug và các tiện ích cho Firefox. | Testing and Debugging Get in get out. That s the attitude that most developers have in testing and debugging their applications. Few developers look forward to these tasks during the development cycle and so they want to efficiently get into the code figure out what s working and what s not fix any problems and then move on. Given the heterogeneous nature of Web applications debugging has always been challenging particularly when trying to work with client-side JavaScript. To address this need fairly sophisticated debugging tools have emerged over the past few years among the developer community most notably Firebug and other add-ons to Firefox. However the problem is that most of these testing tools that Web developers have come to rely on for desktop browsers are not yet compatible with the iPhone and iPod touch platform. Many iPhone developers unsure of where else to turn end up resorting to alert debugging you know adding alert throughout the body of the script code to determine programmatic flow and variable values. However not only is this type of debugging painful but it can also throw off the timing of your script making it difficult or impossible to simulate real world results. While the number of debugging and testing tools are indeed limited right now for Mobile Safari you still have options that either work directly inside Mobile Safari or emulate Mobile Safari on your desktop. You will probably want to incorporate aspects of both as part of your regular debugging and testing process. iPhone and iPod touch Debug Console The update of iPhone and the initial release of iPod touch introduced a Debug Console inside of Mobile Safari. If active the Debug Console displays below the URL bar when a scripting error occurs. You can click the right arrow to display a list of console messages. The errors can be filtered by JavaScript HTML or CSS. You can enable the Debug Console from Settings Safari Developer and turn toggling on the Debug Console option. .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.