The Debugger

The following sections describe the commands and mouse actions you can use in the debugger.

For more information about the debugger, see Infor ES Programmer's Guide.

Debugger commands

Debugger commands consist of one to three words, which can be separated from each other by one or more spaces. The assignment command is an exception, because the variable and the value to be assigned are separated by ':='.

Most commands require a line number or a source name, or both. If no source name is specified, the current source is used by default.

When you start the debugger for an object, the bshell uses the following search mechanism to find the corresponding source:

  1. Searches using the directions in the fd x.x.<pack.comb.> file (where x.x is the bshell version).
  2. Searches in the $BSE/tmp directory.
  3. Searches in the current directory.

The debugger supports the following commands.

Command Action
b [[source] line_number]

Toggle a break point on the current line or specified line of the current source or specified source. When the break point is set, the line is highlighted.

You cannot set break points in included parts in a source. The break point must be set in the included file.

B [source] Display all set break points in the current source or specified source.
c [number] Continue (execute the source) up to the next break point. If you specify a number, the debugger skips that number of break points. The executed source lines are not displayed.
CC [number] Same as 'c', but the executed source lines are displayed.
cc Change the size of the command window. This is valid only when application and debugger are in the same window.
cs Change the size of the source window. This is valid only when the application and debugger are in the same window.
d [source line_number] Delete the break point on the specified line number in the source. If you do not specify a line number, the debugger provides the opportunity to interactively delete any break point in the current source file.
D [source] Delete all set break points in the specified source or current source.
delete all Delete all traces and stop instructions.
delete number Delete a specified trace or stop instruction.
ds Delete the source window.
dd Generate a dump of the data dictionary.
<expression> Execute the specified expression.
f [noarg|noname][number]

Display stack trace (present nesting of functions) with the arguments of the functions. If you specify a number, only that number of nestings is displayed.

  • noarg Only the names of functions are displayed.
  • noname Arguments are displayed but not their names.
fdebug Show the open tables on the command window.
Fdebug Print the open tables to the spooler.
g [source] line_number Continue program execution at the specified line number (goto).
help (or ?) Display the help for debugger options.
l Display the full list of program variables.
L Display the list of program variables that have a value, and display their current values. To stop displaying the contents of an array, enter 'n' at the question 'More ?'.
lp Print the output of the 'l' command.
Lp Print the output of the 'L' command.
mem Generate a dump that includes information about the memory allocated.
p Go to the source line that is currently being processed (this is, useful after the view command or seek command). The line is indicated by a greater than sign (>) before the line number.
q Exit the debugger (quit).
return Continue execution until the end of the current function.
s [number] Execute the program step by step, the specified number of instructions at a time (default is 1). During execution, the intermediate source lines are not displayed.
S [number] Similar to 's', but a function call is executed as a single statement.
slow [number] Reduce the rate of running source code. The maximum number is 100. The minimum (and default) number is 0.
split number Split the command and source window. The specified number is the last line of the command window. This is often used after resizing the Debugger window.
status [trace|stop|number] Display traced variables or stop instructions, or both. If you specify a number, only that traced variable or stop instruction is displayed.
stop if <expression> Stop execution when expression is True.
stop in <function> Stop execution when function is entered.
sym Generate a dump of the symbol table.
trap off Disables 'trap on'. This command is available only when the bshell was started with the -dbgcpu flag.
trap on The debugger stops after execution of every function call. This command is available only when the bshell was started with the -dbgcpu flag.
swin off Hide the separate window for stack, array, and long string.
swin on Display a separate window for stack, array, and long string in the debugger.
t variable Trace the specified variable during program execution. The execution of the program stops whenever the value of the variable is changed. You cannot trace array variables or common variables.
T variable [value] Same as 't', but program execution is not stopped when the variable changes. If you specify a value, execution stops when the variable gets that value.
u [variable] Stop tracing the specified variable. If no variable is specified, you can stop tracing each variable interactively.
U Stop tracing all variables that are currently being traced.
v [source] line_number Display a specified source line in the source window (view). If the specified line number is greater than the total number of lines, the last line is displayed.
v {+-} number Shift the display to the source line that is 'number' lines before or after the current source line.
/pattern Seek a matching text pattern in the current source and display that line.
[function.]variable [/option]

Display the value of a specified variable. If you specify a function, the value of the local variable of that function is displayed. Otherwise, the value of the variable of the current function or the global variable is displayed. If a variable has no value (empty string or zero number), the value is not displayed.

/ option can have the following values:

  • / Display the value of a variable that has the same name as a Debugger command. For example, 'b/' displays the value of variable b.
  • /d Print the flags of the variable and the dimension for arrays.
  • /D Display the number of bytes allocated in a long variable or double variable. Display the number of bytes for one element in a string array.
  • /g For a string that contains the compact string representation of a UUID, display the standard string representation of the UUID. For information, see "UUID overview" in the Infor ES Programmer's Guide.

The following options are useful for record buffers and binary data, and display the value of a string variable with its full declared length, regardless of NULL characters.

  • /x NULL characters are displayed as '^@'.
  • /X Characters with values 0 to 31 are displayed as '\x<value in hex>'.
  • /b All characters are displayed as ' \x<value in hex>'.
  • /l Interpret field as UTC field, print in local time and print current time zone.
  • /u Interpret field as UTC field and print in utc time.
variable := value

Assign a value to a variable. The value can be:

  • A string constant or expression.
  • A numeric constant or expression.
  • A variable name.
vi Activate the vi editor for the current source at the current source line. Changing the source has no influence on the source that is displayed by the debugger in the source window.
width value Change the width of command and source window. You can specify a value between 80–132.
<Ctrl>D/<Ctrl>U Page down or up in source.
<Esc> Toggle between normal mode and history mode.
<Arrow up>/ <Arrow down>

In history mode, these commands display previously executed commands on the command line.

In normal mode, these commands move the cursor through the source.

Debugger mouse actions

The Debugger supports the following mouse actions in the source window:

  • Click a line number to set a break point on that line.
  • Click a source line to move the cursor to that line.
  • Click a variable to display its value. The variable name is placed in the history.