PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: #DefineRexx Tracing[Next]: Break Point Aliases
\ -> Debugging Problems / Tracing -> Debugging Rexx Code -> #DefineRexx Tracing -> Break Point Command Line

Break Point Command Line

When a breakpoint expires you will be left at a command prompt where you can type a number of specialised command or any rexx statement.

You can specify a command or commands to be automatically executed whenever a breakpoint expires by defining them via the REXX_BP_AUTO_CMD macro.

Simply enter the command and press "ENTER", the command lines supported are:

Example of use is:

;--- Define some code that can be called to detect a breakpoint -------
#DefineRexx TestBreakpointCode TRACE_OFF
            ;--- Simple test (same as simpler REXX_BP value) ----------
            if pos('{SOL}x = 2{EOL}', RtSearchText) <> 0 then
               rtStop = 'Y';               ;;Want debug prompt!

            ;--- Also stop if variable 'FRED' exists and equals '1' ---
            if symbol('FRED') = 'VAR' then
            do
               if  Fred = 1 then
                   rtStop = 'Y';           ;;Want debug prompt!
            end;
#DefineRexx


;--- Other possible settings for below --------------------------------------
;#define REXX_BP          {SOL}x = 2{EOL}          ;;Set break point for when x = 2 (whole line ie not "x=22" etc)
;#define REXX_BP          =TestBreakpointCode      ;;Stop where my code says
;#define REXX_BP_ALIAS:B  say 'Dennis was here (alias B)'
;#define REXX_BP_ALIAS_FILES  ;project.a;global.a  ;;Define alias files used (changes NOT saved)

;--- Define rexx code to be debugged (Execute it) ---------------------
#define RexxTrace           OFF                  ;;Don't want to see interpreters output
#define REXX_BP             ?                    ;;Stop anywhere (first $trace)
#define REXX_BP_ALIAS_FILES project.a;global.a   ;;Define alias files used (changes saved to "project.a")
#DefineRexx ''
   Fred = 1;
   do x = 1 to 3
      $trace                  ;;trace next command
      y = x; fred2 = Fred;
   end;

   ;--- Dump all vars now ---
   $trace Finished, dumping all vars
#DefineRexx

Some sample output (without breakpoint output):

---------- REXX TRACE - START(OFF) ----------
$TRACE: @4 -> y = x; fred2 = Fred
      |    x = 1
      | Fred = 1
$TRACE: @4 -> y = x; fred2 = Fred
      |     y = 1
      |     x = 2
      | fred2 = 1
      |  Fred = 1
$TRACE: @4 -> y = x; fred2 = Fred
      |     y = 2
      |     x = 3
      | fred2 = 1
      |  Fred = 1
  $SAY: Finished,dumping all vars
      |  Fred = 1
      |     x = 4
      |     y = 3
      | fred2 = 1
---------- REXX TRACE - END(OFF) ----------


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: #DefineRexx Tracing[Next]: Break Point Aliases


PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am