Debugging programs that use VPLUS is tricky because debugger I/O and VPLUS I/O cannot share the same terminal session. A common way to work around this problem is to use two terminal sessions, one to host debugger output and one to host VPLUS I/O. In the application of this method, the first terminal session hosts debugger output and establishes a FILE equation that directs VPLUS output to a second terminal session. This is the strategy we recommend you use when you want to debug an ACUCOBOL-GT program that uses VPLUS.
The following steps describe one way to start your program so that debugger I/O will go to one terminal session and VPLUS I/O will go to another:
:SHOWME $STDIN LDEV: 90 $STDLIST LDEV: 90
Make a note of the LDEV number. In the above example, the LDEV number is 90.
:FILE VPLUSTF;DEV=90
:RUN /ACUCOBOL/bin/runcbl;INFO="-d VPLUSP"
When you use the debugger, the runtime switches into block mode before calling a VPLUS intrinsic and then back into raw mode after the call completes. This is done because the runtime requires raw mode when using the debugger. When the runtime is in block mode you will not be able to use COBOL DISPLAY/ACCEPT statements, nor will runtime errors be displayed on the screen. To capture runtime error messages, you should use the "-le" runtime option to send error messages to a file.
Some VPLUS calls may cause the keyboard to become locked when using the debugger. If this happens, you must use the appropriate commands for your terminal to unlock the keyboard.