Introduction to debugging

From FlexRule Wiki
Jump to: navigation, search

Debugging lets you to view detailed information regarding rules and logic execution. That is useful when you want to have more visibility regarding the rules (i.e., when you want to make sure your rules and logic behave exactly the way you want). Debugging gives you the option to inspect the values of your objects, check the execution path and record execution into a log.

There are many ways of debugging the rules. It depends on your skill set and the problem you want to solve. You may chose either of the following options:

  • Using rule Designer to visually track the execution of rules and logic
  • Using different events on the Engine

Prepare data

When you are trying to debug particular logic, check if it has any input parameters. Because if it does, then you need to pass some values to the logic at the beginning of execution. By inspecting the Declaration section of rules, you can understand what sort of data you need to prepare. Declaration defines the signature of the a logic. No matter what your logic type (e.g., Procedure, Flow, Validation, Decision, etc.), you need to understand the input parameters of the logic.

Approaches

The next step is to decide to what approach you will take for debugging your rules. You have options to use the following:

  • Visual debugger using FlexRule Designer
  • Visual Studio execution context inspection
  • Code based debugging mechanisms

Next sections

  1. Introduction to debugging
  2. Debugging using Designer
  3. Debugging using code
  4. Debugging in Visual Studio
  5. Inspection Windows
    1. Parameters window
    2. Watch window
  6. Debugging Workflow

Tutorial