Preparing to debug
Before you begin a debug session, you should create a workbench project and ensure that it includes the program that you want to debug. This project must be a Java project or a project with a Java nature. Although having a project is not mandatory for launching a debug session, it is recommended for source location. After you have created the project, you can create a launch configuration for it and begin a debug session.
If you are debugging a Web object, also ensure that the application server is prepared for launching the Web object that you will be debugging and that the application server is started in debug mode. For information about this, see the related topic below or the WebSphere Application Server documentation.
Creating a workbench project for debugging with the Application Server Toolkit
Before you can begin a debug session, create a workbench project and ensure that it includes the program that you want to debug. This project must be a Java project or a project with a Java nature. Note that some of your source may not compile if you do not set up the Java build path to include all of the JARS that you need or if you have only imported part of your program into the project. You can still debug the project and most features of the debugger will work (including breakpoints, stepping, and viewing and modifying variables). However, the inspect and display features in the source view will not work if the source has build errors. The inspect and display features allow you to select an expression in the source view and evaluate it. To set your Java build path, do the following:
- Right-click the project and choose Properties from the pop-up menu.
- In the Properties dialog box, choose the Java Build Path node and then select the Libraries tab.
- Add the .jar files that are needed to build the Web object that you are debugging by clicking Add External JARs and browsing your file system for the files.
- When you are finished adding the JARs, click OK to accept the changes to the project and close the Properties dialog box.
Related tasks
Creating a new Java and mixed language debug launch configuration
Starting the application server in debug mode