TAILIEUCHUNG - WebSphere Studio Application Developer Version 5 Programming Guide part 59

WebSphere Studio Application Developer part 59 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | Debugging a Web application In this section we show how to debug a servlet running as part of a Web application. We will be using the servlet in the ItsoProGuideBasicWeb project for our example. This is the servlet that was developed in Creating dynamic Web resources on page 203. Setting breakpoints in a servlet Breakpoints are indicators to the debugger that it should stop execution at specific places in the code and let you step through it. Breakpoints can be set to trigger always or when a certain condition has been met. To add a breakpoint in the code do the following Open the Li in the Java editor. Place your cursor in the gray bar along the left edge of the editor area on the line Banking banking new Banking . Double-click to set a breakpoint Figure 16-1 . A marker will be shown at the line. Figure 16-1 Add a breakpoint 554 WebSphere Studio Application Developer Version 5 Programming Guide Note Enabled breakpoints are indicated with a blue circle. If the enabled breakpoint is successfully installed in a class in the VM at runtime it is indicated with a check mark overlay. Right-click the breakpoint in the breakpoint view and select Breakpoint Properties from the context menu. A window opens where more detailed options about the breakpoint are displayed Figure 16-2 . Figure 16-2 Breakpoint properties The Enable Hit Count property when set causes the breakpoint to be triggered only when the lines has been executed as many times as the hit count specified. Once triggered the breakpoint is disabled. The other property of interest here is Enable Condition. If set then the breakpoint is reached only when the condition specified in the entry field evaluates to true. This condition is a Java expression. In our case select Enable Condition and enter 104 as the condition. The breakpoint will only be reached when you enter 104 as the customer ID. The Restrict to Selected Thread s list is only filled if a server is

TÀI LIỆU LIÊN QUAN
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.