Intermec PC43d Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 137

Checking for Programming Errors, Using a TRON|TROFF Statement, Using STOP and CONT Statements

Page 137 highlights

Chapter 8 - Error Handling Checking for Programming Errors Use these Fingerprint commands to check for possible programming errors: • TRON|TROFF - Trace the execution line by line during execution. • STOP or CONT - Temporarily stop execution, and resume after being stopped. • DBBREAK - Create a breakpoint. • DBSTEP - Create a breakpoint after a specified number of lines are executed. Using a TRON|TROFF Statement If the program does not work as expected, there may be a programming error that prevents the program from being executed in the intended order. Use a TRON (Trace On) statement to trace the execution. When the program is run, each line number is returned on the standard OUT channel in the order of execution. TROFF (Trace Off) disables TRON. Using STOP and CONT Statements Use a STOP statement to temporarily stop execution when examining or changing variables. Program execution can be resumed from where it was stopped using a CONT statement, or from a specified line using a GOTO statement. You cannot use CONT if the program has been edited during the break. Specifying Breakpoints To make it easier to debug a program step by step, you can specify breakpoints in the program. Use a DBBREAK statement to create or delete a breakpoint. Alternatively, you can use the DBSTEP statement to specify how many lines should be executed before next break. At a break, the message "break in line nnn" is sent on the Debug STDOUT port, which can be specified by a DBSTDIO statement. You can resume the execution at next program line using a CONT statement or from the start of the program using a RUN statement. • All breakpoints can be deleted by a single DBBREAK OFF statement. • Using SYSVAR(36) you can choose whether a change of program mode should be printed to the Debug STDOUT port or not. • The statement LIST,B lists all breakpoints to the standard OUT channel. • The statement DBEND terminates the debugger. Fingerprint Developer's Guide 125

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

Chapter 8 — Error Handling
Fingerprint Developer’s Guide
125
Checking for Programming Errors
Use these Fingerprint commands to check for possible programming errors:
TRON|TROFF - Trace the execution line by line during execution.
STOP or CONT - Temporarily stop execution, and resume after being stopped.
DBBREAK - Create a breakpoint.
DBSTEP - Create a breakpoint after a specified number of lines are executed.
Using a TRON|TROFF Statement
If the program does not work as expected, there may be a programming error that
prevents the program from being executed in the intended order. Use a TRON
(Trace On) statement to trace the execution. When the program is run, each line
number is returned on the standard OUT channel in the order of execution. TROFF
(Trace Off) disables TRON.
Using STOP and CONT Statements
Use a STOP statement to temporarily stop execution when examining or changing
variables. Program execution can be resumed from where it was stopped using a
CONT statement, or from a specified line using a GOTO statement. You cannot use
CONT if the program has been edited during the break.
Specifying Breakpoints
To make it easier to debug a program step by step, you can specify breakpoints in
the program. Use a DBBREAK statement to create or delete a breakpoint.
Alternatively, you can use the DBSTEP statement to specify how many lines should
be executed before next break.
At a break, the message “break in line
nnn
” is sent on the Debug STDOUT port,
which can be specified by a DBSTDIO statement. You can resume the execution at
next program line using a CONT statement or from the start of the program using a
RUN statement.
All breakpoints can be deleted by a single DBBREAK OFF statement.
Using SYSVAR(36) you can choose whether a change of program mode should
be printed to the Debug STDOUT port or not.
The statement LIST,B lists all breakpoints to the standard OUT channel.
The statement DBEND terminates the debugger.