Home
TeamSite
how to debug perl scripts invoked by externaltasks
gsumers22texas
How do you set up to write to a debug output file from a secondary Perl script (say it's unlock.ipl) that is called from an externaltask in a wft?
Turning on/off the #iw_output_file helps debug the wfts, but what about more specific secondary ipls you want to use in a wft (unlock.ipl, iwpt_compile.ipl, etc)?
We want to verify some of the values being set by using the TeamSite workflow modules (::Config, ::WFworkflow, ::WFtask) by those files, but we can't test by invoking the perl script independently from the command line (with the -d option), can we?
something suggested by another Perl developer (with no TeamSite workflow knowledge) is following code inserted into unlock.ipl:
.....
$|=1;
$DEBUG = 1;
$debugfile = "/tmp/debugfile.dbg";
debug("-----------------------");
debug("In unlock.ipl");
.....
debug("iw_home=$iw_home");
......
sub debug {
my $msg = shift;
if($DEBUG != 1) {
return;
}
if(-e $debugfile) {
open(THATFILE,">>$debugfile");
} else {
open(THATFILE,">$debugfile");
}
print THATFILE "$msg\n";
close(THATFILE);
}
........
but this still isn't producing our debug file-
and, isn't the -e option also a command-line directive?
is there a way to get the wf engine to recognize common perl debugging directives?
thanks for any help
Find more posts tagged with
Component react.asset.postCommentThread had an error.
type is required.