The Debugger's Command box can very useful. When the debugger is paused at some instruction, you can type any legal REXX instruction into the Command box, and then press the ENTER key. This instruction will be executed by REXX on-the-fly.

Among the more useful instructions for debugging is the SAY instruction. This allows you to query the value of any REXX variable in your script, or evaluate the return of any function. For example, let's say that you wish to know the value of the variable named MyVar. Into the Command box, type the following, and then press ENTER:

SAY MyVar
The Command box will be cleared, and the current value of MyVar will appear in the Console window. For example, if MyVar's value is "Hello", then Hello appears in the Console window.

Note: You can also display the value of a variable by moving the mouse pointer over any variable name in your script, and clicking the right mouse button once. The variable name will be highlighted in your script, and its value will appear in the Console window.

You can also issue a call to any built-in or add-on function. For example, to display the current time, type the following, and then press ENTER:

SAY TIME('c')
You can also change the value of any variable in your script by typing an assignment instruction into the Command box. For example, let's say that you wish to change MyVar to the value 5. Into the Command box, type the following, and then press ENTER:
MyVar = 5
MyVar now has the value 5. If you type a SAY instruction to query its value, you will see this.

Often, you may wish to change the values of some variables while your script is paused, and then re-Run the script, or Redo the current instruction.

You can even combine several instructions in one line, just like you would in a script, separating each with a semi-colon. For example, you set MyVar to 5, and then display its new value, type the following, and then press ENTER:

myvar = 5; SAY MyVar
Another useful thing is to jump to some label in your script. For example, assume that you have the label Here in your script. Into the Command box, type the following, and then press ENTER:
SIGNAL Here
The debugger will jump to that label. (ie, It will be highlighted in the editor window), still in pause mode. Now you can Run or Step from that point in your script. This is different than setting a breakpoint on the label and Run-ning there. In the latter case, you execute any instructions you pass up to that label. By typing a signal statement into the Command box, you instead jump directly from the current instruction to the desired label.

There are many other useful things that you can type into the Command box. Remember that any legal instruction that you could put into your script, can also be typed directly into the Command box and executed on-the-fly.