Click "actions - > java" and go to the method called StepN where N is the line on which you are using the function and having trouble. Copy the java code into an activity java step. You'll need to adjust the java code a bit to make it save without errors.
Then, you'll be able to insert 'pega_rules_utilities.sendDebugMessageToTracer("whatever you want","Pega-ProCom")' into the java code as many times as you need, to help track down the problem.
NOTE: To see those "whatever you want" strings in the tracer, you need to add and enable the event type called "Debug". /Eric