MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: debugging usertags







On Mon, 12 Jul 1999, Ezra Gilbert wrote:

> I was wondering if some of the more advanced users could tell me their
> methods for debugging their usertags ...  ie:  i am looking for a way to
> output information from one of my usertags to the screen when i run
> minvend in debug mode (start -DEBUG).  Im not a perl monger but i think
> i'd have to output it to STDERR?  Maybe someone can clarify ...
> 
> I basically want to display the value of $Vend::Interpolate::item so i
> can figure out why my pricing scheme isnt working.

UserTag foo <<EOR
sub {
	...
	some code
	...
	$debug=1;
	...

if($debug) {
::logGlobal("my string $my_var");
}
	...
}
EOR

Anything passed to logGlobal will show up in the file error.log (at least
on Unix...).  I actually run MV in normal mode and debug with logGlobal.

Again, if you use Unix, I run 'tail -f error.log' in a separate window.
That way, I see all the dumps to the log as they happen.  Very useful.  If
you use NT, YMMV.

Best,
Kyle



Search for: Match: Format: Sort by: