Top
NetCOBOL V11.0 Debugging Guide
FUJITSU Software

2.4.2 Starting to Debug a Program

To start debugging a program, select File, "Start Debugging". This brings up the Start Debugging dialog box.

2.4.2.1 The Start Debugging Dialog Box

The Start Debugging dialog box lets you input all the information the debugger requires to execute your program. You only need to enter the information that applies to your program. The information requested on each tab is as follows:

Table 2.1 Start Debugging Dialog Box Parameters

Parameter

Description

Application

Application:

Name of the EXE file to be loaded.

This is the only mandatory parameter.

Default: Extension of EXE.

Execution-timeoptions:

Any options expected on the command line of the program.

Start program:

Name of the first program to be debugged (must be a program prepared for debugging).

Default: the first program for debugging executed in the EXE or a DLL called by it.

Source

Source file storage folders:

Directories containing the source of the programs to be debugged.
Default: the folder containing the EXE or DLL file.

Copy library storage folders:

Directories containing copy libraries used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made in order from (1) the directories specified by environment variable COB_COBCOPY and (2) the folder containing the EXE or DLL file. For copy library files with IN/OF specified, a search for the parameter will be made in order from (1) the directories specified by the environment variable COB_library-name and (2) the folder containing the EXE or DLL file.

Subschema descriptor file storage folders:

Directories containing subschema used by the debug target programs.
Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made in order from (1) the directories specified by environment variable COB_AIMLIB and (2) the folder containing the EXE or DLL file.

Descriptor

Screen and form descriptor:

Directories and extension of form descriptors used by the debug target programs.

Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made in order from (1) the directories specified by environment variable FORMLIB and (2) the folder containing the EXE or DLL file. Extension PMD.

File descriptor:

Directories and extension of file descriptors used by the debug target programs.
Default: If this parameter is omitted or cannot be found in the specified folders, a search for the parameter will be made in order from (1) the directories specified by environment variable FILELIB and (2) the folder containing the EXE or DLL file. Extension FFD.

Debugging Information

Debugging information file storage folders

Directories containing debugging information file(.SVD files)

Default: the folder containing the EXE or DLL file.

Batch Debugging

Use Batch Debugging

Batch Debugging is performed.

Command file

File to drive the debugging session.

Default extension: LOG

History file

File to save actions and results from the debugging session.

Default extension: LOG

Details of the Start Debugging Dialog Box Options

Relative file names

When you use relative path names, the debugger adds the folder that was current when the debugger started to the path name.

Multiple folder names

For fields that accept multiple directories, separate the folder names by semicolons ";". The debugger searches for files in order of the specified directories.

The search procedure when the folder specification is omitted or when files cannot be found in the specified folders depends on each file.

For source files and debugging information files, the directories containing the executable files or the dynamic link libraries are searched.

For copy library files, subschema descriptor files, screen and form descriptors, and file descriptors, the folders are searched in order from (1) the directories specified by the environment variable and (2) the directories containing the executable files or the dynamic link libraries. Refer to "Setting Environment Variables" in the "NetCOBOL User's Guide" for details about environment variables used for specifying folders of the various files.

Command and history files

When the "Use Batch Debugging" check box is on, Command file and History file parameters are mandatory.

Do not specify the same file in both the Command file and History file parameters.

If the file specified for the History file already exists, it is overwritten.

Refer to "2.5.2.1.11 Automating Debug Operations" for details on batch debugging and command files.

2.4.2.2 Specifying Options on the Command Line

This section explains how to start the debugger using command format.

To start a debugger with the winsvd command, select it from "Debugger type" in the Tools menu of the Project Manager window. Select the correct type of debugger before executing the start command.

To start the debugger from the command line, use the WINSVD command with the following format:

winsvd [start-parameter] application-name [execution-time-option]

You must specify the parameters in the order shown above.

If you only enter "winsvd", you need to provide the application information in the Start Debugging dialog box.

You must specify application-name if you want to enter any other information after "winsvd".

When you start the debugger with information on the command line, it comes up with the Start Debugging dialog box opened and the command line information entered in the appropriate fields.

To start debugging, enter any further information in the Start Debugging dialog box, and click the OK button.

See the list below for the supported start parameters.

Table 2.2 Start Parameters

Specification Format

Field in Start Debugging dialog box

/G start- program-name

Start program

/S source-file-storage-folder-name

Source file storage folders

/C copy-library-storage-folder-name

Copy library storage folders

/A subschema- descriptor-file-storage-folder-name

Subschema descriptor file storage folders

/M screen-and form-descriptors-storage-folder-name

Screen and form descriptor folders

/E screen-and form-descriptors-extension

Screen and form descriptor extension

/H file-descriptors-storage-folder-name

File descriptor folders

/O file-descriptors-extension

File descriptor extension

/D debugging-information- file-storage-folder-name

Debugging information file storage folders

/B command-file-name

Command file

/L history- file-name

History file

/N

Starts debugging without opening the Start Debugging dialog box.

"-" (hyphen) can be used instead of "/ " (slash) as the first character of a start parameter.

The start parameter letter can be upper case or lower case.

To specify multiple start parameters, provide one or more blanks between start parameters.

Example

To enter a command with the following parameters and options:

  • Application name: E:\EXE\SAMPLE1.EXE

  • Source file storage folder name: D:\SOURCE

  • Debugging information file storage folder name: E:\SVD

  • Execution-time option: PARAM1

The command line would be:

winsvd /S d:\source /D e:\svd e:\exe\sample1.exe param1