Enterprise Developer offers some powerful tools to help you debug local and remote projects. It also supports debugging of single files which are not part of a project. This is a brief overview of how to prepare and debug an application.
Debugging applications that have a project
- Ensure that the current active
build configuration is compiling the project for debugging. See
Compile for Debugging.
- Compile the source code - by default, Eclipse compiles your projects automatically when the projects change.
If
Project > Build Automatically is turned off, to compile click
Project > Build Project.
- Choose or create a
debug configuration by clicking
. Different types of COBOL debug configurations are available for different types of debug sessions, where each type of configuration offers different options and requires different specifications. Like build configurations, you can have multiple debug configurations and swap between them. These settings override the project's run-time settings.
- Click
Debug.
Eclipse opens the Debug perspective that provides views that facilitate debugging.
- Use the options on the
Run menu to step through the program, stop at breakpoints and query data item values and so on.
See
Debugging Features and Techniques in Eclipse for tips on the commands and features that are available during debugging.
- To stop debugging, click
Run > Terminate.
- To leave the Debug perspective and return to the Team Developer perspective, click
Team Developer at the top right of the Eclipse window.
Debugging single files
You can use the IDE to debug single native COBOL programs that do not have a project. The files must be opened in the editor. This does not apply to JVM COBOL files.
To debug a single file:
- Ensure the file is compiled. If necessary, right-click in the editor and click
Compile to produce the program executables.
- Right-click the file in the editor and click
Debug As > COBOL Application.
This starts debugging and the IDE switches to the Debug perspective.
- Step through the program in the usual way.