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 standalone 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 return to either the COBOL or the Team Developer perspective, click COBOL Perspective, COBOL, or Team Developer Perspective, Team Developer, at the top right of the Eclipse window.

Debugging standalone files

You can use the IDE to debug a standalone native COBOL program that is not a part of a project. The file must be compiled for debugging first to produce the information that the debugger requires.

To debug a standalone file:

  1. If necessary, compile the program in the IDE by right-clicking in the editor and clicking Compile.

    Eclipse either used the Compiler directives provided by the associated program symbols file (.idy) or, if no .idy file is present, uses the directives specified in Window > Preferences > Micro Focus > COBOL > Standalone Files > Compile.

  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