KB#00885-Troubleshooting Tips for the BASIC Web Utility (BWU)
Troubleshooting Tips for the BASIC Web Utility (BWU)
When Visual PRO/5 is run on the server, it is executed in the background. This means that SYSWINDOW will not be available for debugging purposes. If Visual PRO/5 encounters an untrapped error while running a program, it will stop running the program and display the error in console mode. Since it is in the server's background, this window will not be visible and it will appear as though both the Client and web server are hung. In reality, they are simply waiting for the Visual PRO/5 session to complete. Because of this, it is very important that all of the programs trap for unanticipated errors. This is typically done with the SETERR verb.
One of the best ways to determine where an error is occuring during the development of a Web application using the BASIC Web Utility is to have the program create dummy files before each step of the program so it's possible to know exactly which utility failed. Using the simple example from the Configuration section in the INDEX of the BWU help files:
0005 STRING "d:/bbweb/progs/bbwebstarted",ERR=0050
0010 CALL "utcgi.wbb",ENV$,CGI$,ERRMSG$
0015 STRING "d:/bbweb/progs/bbweb15",ERR=0050
0020 CALL "uttags.wbb","h1"," My First Web Test Program",HTML$
0025 STRING "d:/bbweb/progs/bbweb25",ERR=0050
0030 CALL "utsend.wbb",HTML$
0035 STRING "d:/bbweb/progs/bbweb35",ERR=0050
0040 CALL "utexit.wbb",CGI$
0045 STRING "d:/bbweb/progs/bbwebworked",ERR=0050
3005 STRING "d:\bbweb\progs\bbweb.err"; LET CHAN=UNT; OPEN (CHAN)"d:\bbweb\pro
3005:gs\bbweb.err"; PRINT (1)"Err:",STR(ERR)," TCB(10):",STR(TCB(10))," Line
3005::",STR(TCB(5))," Channel:",STR(OUTCHAN)," FAKECGI:",STR(FAKECGI)," ARGV(
3005:3):",ARGV(3); CLOSE (CHAN); RELEASE
Debugging Programs during Development:
The most common method of debugging a program is to single step through it (More information regarding the single step verb is found in the Commands Manual under 'Single Step'). A biggest caveat to using single step is to remember to set Byte 1 Bit $08$ of the options vector before beginning or the errors may occur in a public (or "call"ed) program.
Last Modified: 10/30/2009 Product: BASIC Web Utility
BASIS structures five components of their technology into the BBx Generations.