简体   繁体   English

如何在 Eclipse IDE 中调试 Drools 文件 (.drl)

[英]How to debug Drools File (.drl) in eclipse IDE

I am using drools version : 5.5.0.Final我正在使用流口水版本:5.5.0.Final

I have added installed drools plugin following below link: Is there any Drools plugin for Eclipse?我在以下链接中添加了已安装的 drools 插件: 是否有任何适用于 Eclipse 的 Drools 插件?

and getting nice colorful DRL file editor and drools perspectives.并获得漂亮的彩色 DRL 文件编辑器和流口水的观点。

But the reason I wanted to install drools plugin was to be able to debug and inspect each rules in drl file which does not work.但是我想安装 drools 插件的原因是能够调试和检查 drl 文件中不起作用的每个规则。

Basically below steps here doesnt work : http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch08.html#d0e8236基本上下面的步骤在这里不起作用: http : //docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch08.html#d0e8236

I put the debug point in file and run the application in debug mode but it doesnt stop there.我将调试点放在文件中并在调试模式下运行应用程序,但它并没有就此停止。

Can anyone please help me in debuging drl files.任何人都可以帮助我调试 drl 文件。

Declare Dialect type as dialect "mvel" in drl file.在 drl 文件中将方言类型声明为方言“mvel”。 Debug control will move to break points which you have pointed in the respective drl file.调试控制将移动到您在相应 drl 文件中指向的断点。

Another option would be to create a utility class with a debug method:另一种选择是使用调试方法创建一个实用程序类:

public class DebugUtils {
    public static boolean debugValue(Object value) {
        return true;
    }
}

Then call this method from any rule passing your value and put a breakpoint in this method.然后从传递您的值的任何规则调用此方法,并在此方法中放置一个断点。 This way you will be able to debug your rule.这样你就可以调试你的规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM