Today I'd like to share how to debug Groovy scripts in BC4J. At the beginning you must be aware that it is not possible to debug it step by step. But you can help yourself and print comments to the console in the runtime.
Two approaches are possible. First bases on Debugging groovy in ADF post. In short few words, in Model project you need to create a Java class and use it in Groovy:
But what if the expression is much more complicated. Ok, you can call it inside the expression. There is also another way to print a line in the console in Groove - use print keyword.
And, as usually, rendered page and logs output at the end of the post.
According to ADF 12.1.3 features, in 12c it'll be possible to debug it in JDeveloper :)
How can we do it while running junits , i tried the same stuff , but somehow i am not getting the logs to be printed on my console I am using print statement inside groovy Expression.
ReplyDelete@aman, I have never hit such an error... Thought I would recommend you to use the Java wrapper and plain sysouts. But at the end the result may be the same. It rather sounds like a problem with redirection of the standard output. Please check it first.
ReplyDelete