IBM AS/400 manual Setting and Removing, Breakpoints

Models: AS/400

1 489
Download 489 pages 47.95 Kb
Page 205
Image 205

 

 

 

 

 

 

 

 

 

 

Setting

and

Removing

Breakpoints

 

 

 

The current

thread

is

the

thread

that

is

currently

being

debugged.

De

mands

are

issued

to this

thread.

When

a

debug

stop

occurs,

such

the

 

current

thread

is

set to

the

thread

where

 

the

debug

stop

ha

THREAD

command

and the 'Work with Debugged Threads' display can

be

us

change

the

current

thread.

 

 

 

 

 

 

 

 

 

 

To

remove

an

unconditional thread breakpoint use the

CLEAR

debug

command

When a thread breakpoint is cleared,

it

is

cleared for the

curren

Setting and Removing

Conditional

Job

Breakpoints

 

 

 

 

 

 

 

 

 

 

 

You

 

can

set

or

remove

a

conditional

job breakpoint

by

using:

 

 

¹ The

Work

with

Module

Breakpoints display

 

 

 

 

 

 

 

¹ The BREAK debug command to set a job breakpoint

¹The CLEAR debug command to remove a breakpoint

Note:

The relational operators supported for

conditional<,

breakpoints>,=,

are

 

<=, >=, and<> (not equal).

 

 

 

 

 

One

way you can set or remove conditional

job

breakpoints

is through

with

Module Breakpoints display. You access

the

Work

with

Module

Brea

display from the Display Module Source display by pressing F13 (Work

breakpoints). The display provides

you

with a list of options which

either add

or

remove

conditional

and

unconditional job breakpoints. An

the display

is

shown

in Figure 82

on

page 182.

To make the job breakpoint conditional, specify a conditiConnal- expressi dition field. If the line on which you want to set a job breakpoint statement, the breakpoint will be set at the next runnable statement.

If

a thread

column

is

shown,

before pressing Enter,Threadtypefield*JOB. in

 

Once

you

have

finished

specifying

 

all

of

the

job

breakpoints,

you

 

You

can

use F21 (Command

Line)

from

 

the

Display

Module

Source

display

 

the program object from a command

line

or

call

the

program

after

ex

 

display.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When a statement with a conditional job breakpoint is reached, the

 

expression associated

with the

job

breakpoint

is

evaluated

before

 

run.

If the result is false,

the

 

program object continues to run.

 

the program object stops, and

the

 

Display

Module

Source display

 

is

 

point, you can evaluate fields,

set

more

breakpoints,

and

run

any

of

 

commands.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

An alternate method of setting

and

removing

conditional

 

breakpoints

is t

 

BREAK

and

CLEAR

debug

commands.

 

 

 

 

 

 

 

 

 

 

 

 

 

To set a conditional breakpoint using the BREAK debug command, type:

BREAK line-number WHEN expression

on the debug command line. Thelinevariable-numberis the line number in the currently displayed view of the module object on which you want to and expression is the conditional expression that is evaluated when the

Chapter 11. Debugging Programs181

Page 205
Image 205
IBM AS/400 manual Setting and Removing, Breakpoints