Tracing

  • fatbear
  • 05/25/08
  • Offline
Posted: Thu, 2008-11-27 09:38

I've installed: perl -MCPAN -e 'install Devel::Trace'and thought I could just put at the top of the file /usr/libexec/webmin/virtual-server/feature-web.pl:

!/usr/bin/perl -d:Traceand then turn on debugging around code that I want traced (so that it shows up in the GUI output during operations that I'm debugging):

$Devel::Trace::TRACE = 1; ... code to be traced ... $Devel::Trace::TRACE = 0;But, this isn't working. This is the development pattern I use when I want to trace steps in perl normally. What do I need to do to get webmin to recognize it? I did try modifying the shebang of /usr/libexec/webmin/miniserv.pl, but that didn't work.

Post edited by: fatbear, at: 2008/11/27 08:40<br><br>Post edited by: fatbear, at: 2008/11/27 08:41


Re:Tracing

  • Joe
  • 10/23/08
  • Offline
  • Thu, 2008-11-27 20:47

You'll need to run Perl for the whole miniserv.pl process this way, I suspect, as Webmin does some trickery to run in a single Perl process for most actions for performance reasons.

So, I think you'd need to edit the Webmin startup script to start it with this option. Probably /etc/init.d/webmin or /etc/webmin/start...actually, it looks like you could probably edit /usr/libexec/webmin/miniserv.pl to use this shebang line.