Tuesday, February 9, 2016

ADF 12c: Debugging Groovy

Oracle has provided a new feature in 12.1.3 to debug a groovy code. Feature is very much required and very simple to use.

Ideally you just need to select Groovy Line at design time and then run debugger. Jdeveloper will stop while running that line of groovy and you will be able to check values of local variables in Jdeveloper data window.

One thing that you need to notice is Dont use source mode to select groovy expression. Use Declarative mode (overview tab). In below diagram I am showing how EO validation is selected.

As a result when you run debugger you will see application stops when groovy is getting executed and you can go line by line from there, while viewing local variables in data window of debugger.


Even you get handle of this variable, which can be used to view other values.


Simple but very very useful feature in ADF. So no more println(varname)

1 comment:

Mariusz said...

Nice post.

The idea of debugging groovy in BC4J is breat, but for me unfortunatelly groovy debbuger works unstable and JDeveloper sometimes freezes.