In OpenInsight 9.2.1 and above, when using CTO or AREV32, it is now possible to debug your processes using the graphical OpenInsight debugger (as opposed to the character-based alternate debugger that is used by default in CTO and AREV32).  You must be using an EngineServer connection (as opposed to the  direct , local connection specified with  .  in the CTO configuration record (found in SYSENV or the MD table of the application)).

 

Make sure you are running the EngineServer on your desktop, in a DOS command box using the java command (java -jar oesocketserver.jar), and not as a service.

 

Edit your CTO configuration record (named CTO*<username> in the MD table of the application you re running in, or just CTO in the MD table, or CTO in the SYSENV table), verifying that field 1 contains your local machine ID (either  127.0.0.1 , or  localhost , or the actual IP address or name of the local machine), and field 2 contains the port that the EngineServer will be  listening  on (8088 by default) in its first value.  The third and fourth values contain the startup and shutdown flags, respectively; set them both to  1 , and save your configuration record.

 

Your CTO record should now look like this:

 

 

Once you have saved your modified CTO record, you can start up CTO or AREV32.  You should see a visible OpenEngine (OEngine) start on your desktop.

 

By default, when CTO or AREV32 starts up, the alternate debugger is automatically enabled.  OpenInsight 9.2.1 and above allows you to change this dynamically with the RTI_SET_DEBUGGER command.  From TCL in CTO or AREV32, issue the command:

 

RTI_SET_DEBUGGER  1 

 

Or from within a stored procedure add the following line:

 

CALL RTI_SET_DEBUGGER( 1 )

 

This will re-enable the normal OpenInsight graphical debugger.  Now, when you encounter a run-time error, or a DEBUG statement, the OEngine on your desktop will launch the graphical debugger, allowing you to step through your CTO or AREV32 routine.