ILOG JRules User Guide > Running and Debugging > Getting Started > Overview: Testing Rules and Ruleset Execution

Debugging a business rule application is a methodical process of finding and reducing the number of bugs, or defects, in a ruleset or piece of Java code that is used to execute the rule engine. The overall objective of debugging is to make the program behave as expected.

The execution of a ruleset requires the following steps:

  1. Instantiating a new engine or connecting to an existing engine.
  2. Sending the ruleset to the engine.
  3. Executing the ilrmain function, if it exists, or executing the ruleset in the engine.

You can then use breakpoints, stepping, or expression evaluation to debug your rules.

If you have used a different IDE to Eclipse to develop a Java application that instantiates the rule engine and you want to debug the ruleset and the application concurrently you will have to use Rule Studio to reference the source code and classes from the Eclipse Debug Configuration.

It is not possible to debug a ruleset and a Java application at the same time without using Rule Studio. However it is still possible to use another IDE to write the Java code and build the application.

Local Debugging

After you have finished editing and building your rule project, you can launch the project on your workstation locally. The project may be launched in either run or debug mode.

Launching the project in debug mode will establish a connection between the debugger client and the rule project that you are launching.

Remote Debugging

Remote debugging entails running an application on one computer and debugging it on another computer. The debugging facility itself is used exactly as if you were debugging code running locally.

The main requirement for remote debugging is access to networked machines. The client user interface is running on one system while the debug engine is running on another system.

You are likely to want to use remote debugging when you develop a Java project or to run on a platform that the debugger does not run on. J2EE is a good example of this case. You can use the remote debug feature to take advantage of the debugger user interface while debugging the remote application.

Related Concepts

Ruleset Debugging
Rule Engine
Rule Execution Server

Related Tasks

Creating a Debugger Launch Configuration
Debugging
Debugging Remotely

Related Samples and Tutorials

Tutorial: Debugging a Ruleset
Tutorial: Debugging a Remote Rule Execution Server Application