TAILIEUCHUNG - Visual studio 2010 part 17

Thường xuyên hơn chúng tôi muốn, mã của chúng ta có lỗi. May mắn thay, khi lỗi nào xảy ra, bạn có rất nhiều sự giúp đỡ với VS. Chương này chỉ cho bạn cách sử dụng trình gỡ rối VS để sửa vấn đề bằng cách thiết lập các điểm ngắt, đẩy mạnh thông qua các mã, và chương trình kiểm tra nhà nước | Chapter 6 Debugging with Visual Studio 143 144 Microsoft Visual Studio 2010 A Beginner s Guide Key Skills Concepts Exploring Available Debugging Tools Setting Breakpoints Inspecting Program State Solving Problems with VS Debugging Tools More often than we would like our code has bugs. Fortunately when bugs do happen you have a lot of help with VS. This chapter shows you how to use the VS debugger to fix problems by setting breakpoints stepping through code and inspecting program state. There s also a section on development-time tools to inspect the structure of your code. Beyond setting breakpoints you ll learn how to customize breakpoints and how to manage a list of breakpoints. Then you ll see the options VS has for stepping through code. This chapter also shows you many ways to see what the values of variables are in your code and the various tools available for inspecting your code. First we ll start with some example code you can use to practice the concepts learned in this chapter. Example Code for This Chapter It would take many pages of code to show a complete program with all of the complexity of a real-world scenario which might be hard to follow for the purposes of this chapter. So the example you ll see simulates the environment of a full application. When performing debugging you ll need to traverse hierarchies in code where one method calls another which could go multiple levels deep depending on the program. The example code will have multiple levels of method calls so that you can see how to use VS to debug code. Listing 6-1 shows the example code for this chapter. It s a console application just like all of the applications created in previous chapters. You create a console project by selecting File New Project select the Console Application project give the project a name and generate the project by clicking OK. The application in Listing 6-1 calculates a discount for a customer based on a special discount percentage for that customer and what .

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.