Top
NetCOBOL V11.0 NetCOBOL Studio User's Guide
FUJITSU Software

7.1.3 Starting debugging

This section explains the procedure for debugging a program.

  1. Select a COBOL project in the Dependency or Structure view.

  2. Select "Run" > "Debug Configurations..." from the menu bar. Alternatively, click in on the toolbar, and select "Debug Configurations...". The "Debug Configurations" dialog box appears.

  3. Double-click "COBOL Application" in the left pane. The startup configuration setting page displays in the right pane.

  4. The default startup configuration name is displayed in the Name field. The startup configuration name can be changed.

  5. Check the contents of the "Main" tab, and add or modify the contents as necessary.

    1. "Project name" is the COBOL project name selected in step 1.

    2. "Executable File" is the program to be executed first at the start of debugging. If the specified TARGET of the project is an executable file, it cannot be changed. If the specified TARGET is a dynamic link library, specify the relevant file.

    3. Specify the current folder at execution time in the "Working folder" field. If the dynamic link libraries required for execution are stored in this folder, they can be loaded during execution, even if other settings such as path settings have not been made.

    4. For "Program arguments", enter the arguments specified for Executable File in the format used for the command line interface.

  6. Select Debug to start debugging.

Point

Debugging can be started with the default settings by selecting a project in the Dependency or Structure view and then selecting "Run" > "Debug As" > "COBOL Application" from the menu bar.

Note

Other debuggers (e.g. COBOL, Java) cannot be started while debugging a COBOL program.

The same workspace folder cannot be used from more than one NetCOBOL Studio.

7.1.3.1 Setting items of the COBOL application startup configuration

This section explains setting items of the COBOL application startup configuration.

Main tab

item

Description

Project name

The select project name is displayed.

Executable File

This file is executed first at the debugging. When the target is an execution file, cannot be changed. When the target is a dynamic link library, specify an appropriate file.

Working folder

Specify the current folder at execution time. The dynamic library stored in this folder is loaded without other path settings.

Program arguments

The argument of the program is input.

Source tab

This tab specifies search paths for COBOL source files and COBOL library files. Searches for sources are performed in the order displayed in "Source lookup path". Projects and folders can be added to the search paths. The order of the added search paths can be changed using "Up" or "Down".

Note

If an external folder is specified in a search path, the following functions do not work correctly for the COBOL source programs in the external folder:

  • Breakpoint operations

  • Run to Line of the context menu of the COBOL editor

To use either of the above functions, Fujitsu recommends specifying the corresponding project in the source search paths. When debugging a COBOL source file in an external folder, debug each line using "Step Into" or "Step Over".

Environment tab

This tab sets information used by a COBOL runtime module. Before the start of its processing, the COBOL runtime module uses this information to obtain environment-specific information.

To add the environment variable information set here to existing system environment variables or user environment variables, select "Append environment to native environment". To replace the existing environment, select "Replace native environment with specified environment".

Note

If the same setting in an environment variable is made both on the "Environment" tab and in the runtime initialization file, the information set in the runtime initialization file is valid. For details on runtime environment information, see the "NetCOBOL User's Guide".

Common tab

This tab specifies how to save the startup configuration, which perspective to open after the start of execution or debugging, and other settings. For details, see the description of the "Common" tab in "8.2 Executing a COBOL Program".