E9.2 How do you debug Groovy , JRuby or Jython functions in Orchestrator

JohnDanter2

JohnDanter2

VIP Member
Hi folks

With all the new lovely languages we have in Orchestrator, let alone the JET graphs I've posted about before, how do you 'debug' the lines of code we write in the Orchestrator steps?
JET is easy as you do that in JDeveloper and Chrome itself (F10 etc) but how exactly do we debug the lines of code in a Groovy orchestrator step?

All we can see at the moment is values in and values out of the step and it's a kind of black box. I'd like to hit lines of code in the functions or even manipulate output step.

Do you use a third party tools to step line by line, or is this already available in 9.2 and I've missed it :)

Thanks

John
 
You can debug your java-based scripts in jDeveloper with a bit of work (and I've done this for the heavy-lift scripts like encoding jwt), but otherwise I populate output vars as I go so that during testing they get populated. It becomes messy if you leave your output vars in the script when it comes time to promote :)
 
I have VS Code setup to debug Ruby, but I almost never use it because it is less effort to debug in orchestrator. Typically, it is commenting out blocks of code to narrow down issues, using output variables to capture debug information as @DaveWagoner suggested. I have used orchAttr.writeDebug and orchAttr.writeWarning as @alfredorz suggested when chasing down weird errors that come up in integration testing or production. One thing with the writeDebug to keep in mind is that your CNC will need to turn on debug for those messages to get captured to the log.
 
I just use a web based ruby/groovy console like jdoodle and assign the input JSON into a variable using the <<-TEXT construct and print lots of debug strings.

Using orchAttr.writeWarn is not that helpful as it is too hard to find the messages in the AIS logging.
 
I did subscribe to rubymine for the free trial to solve something more complex but had no further use so didn't continue the subscription. It has a proper IDE and debugger.
I tried VS Code but found it to be much less painful to just stick a rusty fork in my eye.
 
Back
Top