The debug / animator session currently automatically creates a BREAKPOINT at the first PROCEDURE DIVISION statement.
If the program has DECLARATIVES (which must necessarily be positioned at the beginning of the PROCEDURE DIVISION) then the automatic BREAKPOINT is positioned at the first statement after the DECLARATIVES which is not the first statement that will be executed by the program. See a sample at following figure.
In cases like this the automatic BREAKPOINT should be set to the first statement after the END DECLARATIVES.
This is in fact the first statement that will be executed by the program. See following figure.
If it can be useful for testing, I attach the GnuCOBOL source program with DECLARATIVES (it is a program that allows you to manage a simple master file).
Select 01 ADD function at first use will activate the DECLARATIVES to create the master file.
The debug / animator session currently automatically creates a BREAKPOINT at the first PROCEDURE DIVISION statement. If the program has DECLARATIVES (which must necessarily be positioned at the beginning of the PROCEDURE DIVISION) then the automatic BREAKPOINT is positioned at the first statement after the DECLARATIVES which is not the first statement that will be executed by the program. See a sample at following figure.
In cases like this the automatic BREAKPOINT should be set to the first statement after the END DECLARATIVES. This is in fact the first statement that will be executed by the program. See following figure.
If it can be useful for testing, I attach the GnuCOBOL source program with DECLARATIVES (it is a program that allows you to manage a simple master file). Select 01 ADD function at first use will activate the DECLARATIVES to create the master file.
MASTER.COB.TXT