Baan CPU

Debug functions

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Debug Functions, or, from the command line, run –dbgfun.

Use debug version of the CPU

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Debug CPU, or, from the command line, run –dbgcpu.

Show Bshell CPU instructions

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Debug Instructions, or, from the command line, run –dbginstr.

Dump 3GL stack traces on function entry

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Dump Stack Traces, or, from the command line, run –dbgstack.

Debug get.var and put.var functions

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Getvat/Putvar debug, or, from the command line, run –dbggpvar.

Debug the use of APIs

On the command line you can specify the -dbgstrictapi option with a comma separated list of APIs. If this option is present then messages can display in:

  • Error: The message is sent to the message window and the process is terminated.
  • Warning or Info: The message is sent to the bshell log file and the process continues.

With the -dbgstrictapierror option messages in the warning category can be promoted to errors.

The only known API currently is streams . If this API is present then all incorrect use of the streams API is reported. The streams API includes the seq.* and ims.* functions.

These actions on streams are incorrect:

  • Using a file pointer that is not valid. Note that seq.close() and ims.close() invalidate the file pointer. This message is an error.
  • Closing a file pointer that is owned by a different process. This message is a warning.

Both incorrect uses can result in unexpected program behavior or even crash the bshell.

Show program flow

In the Option Dialog dialog box, select Debug Bshell. On the Bshell Debug Levels tab, select Program Flow, or, from the command line, run –dbgflow.

Trace specific bshell functions

On the command line, you can select a specific set of bshell functions to trace. This allows a finer level of trace without the overhead of –dbgfun –dbgcpu. For example, specify –dbgtrace “seq.open,seq.close” to trace all the bshell calls to the seq.open and seq.close functions. You can add * at the end. For example, specify –dbgtrace “xml*,seq.*” to trace all functions that start with xml and with seq.. If you specify –dbgfun and –dbgcpu, this trace is ignored.

The –dbgtrace works without the –dbgcpu.

If –tracelevel level is added, function arguments are also displayed in the trace.

If -dbgtracestack is added, then a complete stack trace is added before the entry of a function being traced with the -dbgtrace option.