Views in the Debug perspective

When you start debugging, the Debug perspective is displayed, with the views useful for debugging. The default views are listed below; you can display them by clicking Window > Show View.

Breakpoints View
Shows the breakpoints and the watchpoints you have set, and enables you to set a breakpoint for any program the application calls. You can set actions to take when a breakpoint is hit, by setting the actions in the breakpoint's properties. You can add watchpoints so that execution suspends when the data item changes.

You can set a breakpoint or watchpoint by double clicking in the margin of the code view.

You can create a program breakpoint for any program in the workspace by clicking Run > Add Program Breakpoint, or clicking the Add Program Breakpoint icon icon in the Breakpoints view, and entering the name of the file.
COBOL Copy view
You can also debug in the COBOL Copy View, which expands copybooks in line, so you can use it to perform debugging of your code and copybooks in a single view.
Debug view
This view gives a dynamic view of all the threads. For each thread, this view shows the call/perform stack, showing where the current statement was called from or performed from, and where previous calls and performs came from. You can move the execution point, by right-clicking a thread and choosing an option from the menu.
Expressions view
Shows the values of data items that you choose to monitor, whether or not they are directly accessed by the current execution statement while debugging.

During a debug session, you can add a data item to this view by selecting the item and inspecting it (press Ctrl+Shift+I) and then selecting the Add to Expression View (native COBOL projects) or pressing Ctrl+Shift+I again (JVM COBOL projects) in the Inspect viewer. You can also type expressions directly into the Expressions view using Add to Expression View or Add new expression icon in the view itself. The added expression can be any string, but to be evaluated it needs to be a valid expression.

The supported expressions are: normal numeric arithmetic expression with intrinsic functions and the single use of alphanumeric intrinsic functions. For example, if you have the following variables defined:

01 a pic 999 value 2. 
01 b pic xxxx comp-x value 3. 
01 table-c.
   03 c pic 9 occurs 10 times.
01 xyz value "abc". 

You can use expressions of the type:

a + b * 1
a + function max(10,20)
function upper-case(xyz)
1 + 10
function hex-of(b)
c(5)
c(2 arith-exp 2)         *> arith-exp can be +,-,*,/
data(a:b) at my-pointer  *> a=starting offset of memory, b=bytes to query, my-pointer=name of valid pointer item

The following expressions are not supported - logical operators such as b-and and b-or; ISO2002 user defined methods; inline method invokes, and intrinsic functions which are evaluated at compile time.

Memory view
You can use the Memory view to monitor or change the value of a data item or for data in a specified address. You can display the contents of the memory in Hex, ASCII or EBCDIC format rendering.
Variables view
Shows the values of variables and file statuses of internal file names in use on the current or previous line of code. Those which have just changed in the last statement executed are highlighted.
You can configure the contents of this view in Preferences > Micro Focus > Debug; for example, to display values as hexadecimal (Display hexadecimal values).
For procedural COBOL: Shows the data items in the previous and current statements, together with the data items' values.

For native OO COBOL: Shows all the local data items and parameters and the SELF item (containing all fields).

You can change values of the variables in this view. Select a variable from the list, right-click and select Change Value. A dialog box is displayed that enables you to change the value within the parameters of the variable's PICTURE clause.
Note: Variables defined with the DYNAMIC LENGTH clause cannot be expanded beyond their current length; that is, the length at the time of the step being executed.