Previous Topic Next topic Print topic


Overview of the process of debugging

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

  1. Ensure that the current active build configuration is compiling the project for debugging. See Compile for Debugging.
  2. 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.

  3. Choose or create a debug configuration by clicking Run > Debug Configurations. 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.
  4. Click Debug.

    Eclipse opens the Debug perspective that provides views that facilitate debugging.

  5. 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.

  6. To stop debugging, click Run > Terminate.
  7. 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:

  1. Ensure the file is compiled. If necessary, right-click in the editor and click Compile to produce the program executables.
  2. Right-click the file in the editor and click Debug As > COBOL Application.

    This starts debugging and the IDE switches to the Debug perspective.

  3. Step through the program in the usual way.
Previous Topic Next topic Print topic