Chapter Contents

Previous

Next
Command Directory

break

Request a Breakpoint

ABBREVIATION
b{reak}

FORMATS
Format 1: break
Format 2: break HOOK-TYPE [when (EXPRESSION)] 1 [count n]

DESCRIPTION
The break command requests breakpoints at line-number hooks in a program.

Format 1: The break command is used without arguments only within an on command because you specify the location of breakpoints as part of the on command syntax.

Format 2: See Using Debugger Commands for the details of the HOOK-TYPE argument, which is used to specify line-number hooks as breakpoints.

A when clause is used to request breakpoints conditionally; that is, a breakpoint is requested at every line-number hook only if the when clause is true when the line-number hook is reached.

The argument count n is optional. If count n is specified, the first n-1 times the line-number hook is reached, the count is decremented. The nth time it is hit, the command is executed. After the nth time, the command is executed every time the line-number hook is hit.

If a when clause is present, a hit is counted only if the when expression is true.

A query command, issued before the count drops to 1, displays the current value of count. The keyword count can be abbreviated to cou{nt}.

Identical requests: If a break request is made that is identical to an existing one, the identical request is not installed. This is true whether the request to be installed is within an on command or typed in at the command line.

If an identical request is issued and the original request is disabled, the identical request is discarded and the original request is automatically enabled without an indication.

If count n is used, the count is ignored in identical requests. If an identical request with a different count is entered, the count field of a query command is updated with the new count, and a message is produced.

EXAMPLES

break *
breaks at every line-number hook in a source file compiled with debug .

break entry
breaks on entry to all functions.

break calls
breaks at each call to a function and at each return from a function. (In the case of function calls, program execution is interrupted twice for each function called: on calls from functions and on return to the calling function.)

break main 45 count 10
breaks at line 45 of the main function the tenth time the line-number hook at that line is reached. After that, it breaks every time line 45 is reached.

break 53
breaks at line 53 of the current function.

break (comp23) entry
breaks on entry to any of the functions in the comp23 section.

break func1 entry when (parm1 ==5)
breaks on entry to the func1 function when the value of parm1 is 5.

break func 23:46
breaks at lines 23 through 46 of the func function.

SYSTEM DEPENDENCIES
none

COMMAND CAN BE ISSUED FROM

PROFILE yes
configuration file no
Source window prefix b

SCOPE
The break command uses command scope to resolve references to all identifiers, function names, and section names.

RETURN CODES SET

SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.