Debugging Project in Studio

How to debug the ASG_DefaultImplementation project.

You can set the breakpoints, stepping through the code, suspending launched programs, examining the contents of variables, providing rule input, and so on, using the Studio debugger.

The Studio debugger integrates with the Eclipse Java development toolkit debugger. You can debug local projects using their CDD and EAR files.

To debug the ASG_DefaultImplementation project in Studio, follow these steps:

Procedure

  1. Copy TIBCO_HOME/be/5.1/bin/be-engine.tra to TIBCO_HOME/be/5.1/bin/be-engine.tra.bak
  2. Copy TIBCO_HOME/asg/2.1/bin/asg-engine.tra to TIBCO_HOME/be/5.1/bin/be-engine.tra
    Note: Steps 1 and 2 are optional and are used only to back up the TRA files.
  3. Open the ASG_CONFIG_HOME/asg/asg.properties file and copy the entire contents.
  4. Open the TIBCO_HOME/be/5.1/bin/be-engine.tra file, go to the end of the file and append the contents of ASG_CONFIG_HOME/asg/asg.properties file.
  5. In the TIBCO_HOME/be/5.1/bin/be-engine.tra file, uncomment and set the following property to the project configuration folder.

    tibco.clientVar.ASG/ConfigRoot=C:/ProgramData/TIBCOASG/tibco/cfgmgmt/asg/default

    For example,

    • To debug a BookQuery project configuration, set the property as follows:

      tibco.clientVar.ASG/ConfigRoot=C:/ProgramData/TIBCOASG/tibco/cfgmgmt/asg/BookQuery

    • To enable the generic pageflow, set the java property as follows:

      java.property.be.engine.channel.pageflow.genericContext.enabled=true

    Note: You must change the value of the tibco.clientVar.ASG/ConfigRoot property to the configuration of the project you are working on.
  6. Save your changes for the TIBCO_HOME/be/5.1/bin/be-engine.tra file.
  7. Start the Studio, if not already started. See Starting Studio.
  8. Import the ASG_HOME/projects/ASG_DefaultImplementation project in the Studio. See Loading the Default ASG_DefaultImplementation Project.
  9. In Studio Explorer, select the ASG_DefaultImplementation project. From the menu, select Run > Debug Configurations
  10. For local debugging, On the Debug Configurations dialog, select and double-click the TIBCO BusinessEvents Application node on the left. Ensure that the ASG_DefaultImplementation project is selected.
    1. Select the Main tab and configure values as explained in the "Debug Configuration Parameters Reference" table in step 10c.
    2. Select the Environment tab and configure the environment variables as needed, to run or debug the project in Studio.

      For example, edit the following variable to set the value as:

      PATH: PATH:TIBCO_HOME/tibrv/8.3/bin

      where PATH is the existing value of the PATH variable.

      Note: You can add new variables using the Environment tab. You can select and then edit the existing variables. You can append your edited variable to the existing environment variable, or replace the existing environment variable with the specified variable. For example, if a custom function depends on a native library, you can add the path to that library using the PATH, LD_LIBRARY_PATH, SHLIB_PATH, or LIBPATH variable, as appropriate for your operating system.
    3. Select the Classpath tab and configure the class path for external libraries or custom functions, as needed.

      For example, if the project uses Rendezvous or JMS channels, then you can add the Rendezvous or JMS libraries to the class path.

    Debug Configuration Parameters Reference
    Field Notes
    Name A descriptive name. It appears in the drop-down list of configurations.
    Main Tab
    Project Browse to select the ASG_DefaultImplementation project. This appears by default as this project is currently selected in the Studio.
    VM Arguments Optional. Provide options and parameters using -V, -D, -X and so on.

    For example,

    • To set global variables use: -VVariable=value
    • To set properties for generic page flow, set java property as follows:
      -Dbe.engine.channel.pageflow.genericContext.enabled=true
    CDD File Browse to select the CDD file as ASG_HOME\bin\asg_core.cdd to be used for this debug configuration.
    Processing Unit Specifies the name of the processing unit (PU) whose values are used for this debug configuration. The drop-down list displays PUs available in the asg_core.cdd file.

    For example, set this value as asg-caching-core.

    Working Directory The location of the working directory for the Core Engine. This location is used to store temporary files and logs. Browse and select an existing directory.

    Path names that do not start with the root directory are assumed by the operating system to start from the working directory.

    For example, on the Windows platform, set the working directory as follows:

    C:\temp\asgworkarea

    EAR File Browse to select the EAR file to be used for this debug configuration. The EAR file must be generated with the Generate Debug Info option selected on the Project > Build Enterprise Archive. See Editing Validating and Building the Default ASG_DefaultImplementation Project to build the EAR file.

    Set this value as: TIBCO_HOME\asg\2.1\bin\asg_core.ear

  11. On the Main tab, click Apply to save the debug configuration changes.
  12. Click Debug to launch the debugger. Verify that the debugger is launched.