RW_DEBUG is an interactive TCL program that allows RealWeb subroutines to be debugged using the DataBasic Debugger. RW_DEBUG prompts for subroutine name, parameters and cookies. It then calls the subroutine in the correct RealWeb context. When the subroutine completes, the control, output buffer and cookie parameters can be printed on the console.
To start a debugging session, enter
RW_DEBUG
You will see the following prompts:
Enter subroutine name ?
Enter the name of the subroutine you wish to debug.
Enter parameters in the form a=b ?
Enter the name of a parameter that you wish to pass to the subroutine, followed by an equals sign and the parameter value. Each time you press return, you will be prompted with a question mark to enter another parameter. When you have entered all your parameters, press return without entering anything.
Note: These parameters would normally be included in the URL. See Passing Data to a RealWeb Subroutine.
Enter cookie name ?
Enter the name of a cookie that you wish to be available to the subroutine. You will be prompted:
Enter cookie value ?
Enter the value of the cookie.
When you have entered all your cookies, if any, press return
in response to the Enter cookie name ?
prompt.
Hit RETURN to call subroutine ?
Press return to run your subroutine.
Print control string ?
If you enter Y
, RW_DEBUG will output the RealWeb control string containing
any system parameters set using RW_SET_TIMEOUT
and
RW_SET_TYPE.
Print output buffer ?
If you enter Y
, RW_DEBUG will output the HTML generated by
the subroutine.
Print cookie control ?
If you enter Y
, RW_DEBUG will output the RealWeb cookie
control string. This is a multivalued string containing any cookies created or
modified by the subroutine. The values for each cookie appear in the order:
name, value, timeout, path, secure, domain.
message:
Subroutine not allowed
[B34] Insufficient number of parameters passed to external
subroutine; abort!
Enter parameters
prompt and use RW_GET_PARAM
to access them (when calling the RealWeb subroutine from a web browser,
these parameters would be included in the URL).:RW_DEBUG Enter subroutine name ?PJD4 Enter parameters in the form a=b ?REG=G74GUX ? Enter cookie name ?FRED Enter cookie value ?A VALUE Enter cookie name ? Hit RETURN to call PJD4 ? Print control string ? Print output buffer ?Y <vehicle><reg>G74GUX</reg> <type>4 DOOR SALOON</type> <make>FORD</make> <colour>GREY</colour> <keeper>FREDA MAY LEONARD</keeper> <address><street>16 SCHOOL ROAD</street> <district></district> <city>DUNDEE</city> <postcode>DD5 9ZZ</postcode> </address> </vehicle> Print cookie control ?Y :
:RW_DEBUG Enter subroutine name ?COOKIE Enter parameters in the form a=b ? Enter cookie name ?FRED Enter cookie value ?JUNK Enter cookie name ? Hit RETURN to call COOKIE ? Print control string ?Y Print output buffer ?Y NAME: MYCOOKIE<BR>VALUE: <BR> <BR> NAME: FRED<BR>VALUE: JUNK<BR> <BR> COOKIE LIST: FRED<BR> Print cookie control ?Y MYCOOKIE]MY_VALUE]l0^FRED]FRED_VALUE]20]/]FALSE :